|
Hello, I am running XCode 13 and have run into an annoying visual issue with Day 19 - Project 2. I have the flag buttons set up as 200x100, but as soon as I add constraints to them the dimensions change to 224x114 producing an ugly padded border around the image. I have looked around the options of the interface builder and have played with settings but nothing seems to allow the removal of that padding with constraints. Am I just missing it or am I stuck just positioning the buttons by hand? Manual positioning displays the bordered flags correctly, but I would imagine they would have issues on differnt devices. Thanks in advance for any tips. -Jaime |
|
Figured out the solution to this. It seems that you have to create each button from scratch rather than copy buttons. Feels super inefficient, especially for a visual editor such as Interface Builder, but good to have a solution. |
|
I have the same issue, despite making it from scratch result is the same. After setting constraints as in video it changes to 224x114. Weird... |
|
Seems like once you've changed Button from <Type: System -> to Type: Custom> and from <Style: Plain -> to Style: Default> in Attributes Inspector such nuisance will go away! |
|
|
|
@ygeras Though this was posted a year ago, only Your solution worked. I was so mad that I couldn't fix that. Tried everything except that I mean it wouldn't reach my mind to change those settings. Thank You! |
|
I had 2 problems:
I hope this can help someone else, it took me a too long to work this out. |
|
Thanks folks! I had to delete the title again after I changed the style to default and it worked as intended. |
SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.