Auto Layout Troubles
I think for many design fanatics, it's really fun to develop iOS apps because the Apple philosophy of building apps is UI first. What that means is the storyboard (the page that you build the visual aspect of your app on) is a really important part of the app development cycle. Things you put on there will be outlets or outlet action that will perform the code written or display the results of certain functions. Apple does a really good job making everything look nice and with the measurements laid out in front of you so you can get all the buttons or labels to align well each other. However, a big downside is that the box that is the playground for your app is not representative of what is going to be displayed on your phone.
Here comes auto layout where we have constraints that act as margins from HTML-CSS. This is where things are not intuitive. Constraints have to be on most parts of the objects you put on the storyboard and they all have to relate to each other, otherwise it would load the frames like you think they would. It's hard to explain without pictures but trust me, it was very frustrating to get over the hump when you first learn it because without having a proper storyboard, there's no point in how much code you write in the view controllers.
No comments:
Post a Comment