{"id":689,"date":"2013-06-10T22:47:10","date_gmt":"2013-06-10T22:47:10","guid":{"rendered":"http:\/\/triangleappshow.com\/?p=689"},"modified":"2022-12-15T06:46:46","modified_gmt":"2022-12-15T11:46:46","slug":"experiences-with-constraints-and-storyboards","status":"publish","type":"post","link":"https:\/\/michaelrowe01.com\/index.php\/blog\/experiences-with-constraints-and-storyboards\/","title":{"rendered":"Experiences with Constraints and Storyboards"},"content":{"rendered":"<p>Well, it was a challenge, but I got it done.  This past weekend I spent most of the time refactoring my personal app to using iOS 6.1&#8217;s autolayout capabilities.  While I started off pulling out my hair, I ended the weekend with screens that looked pretty good, and that correctly handled almost everything I could throw at it.  The net of all of this, is that I learned how to improve the flexibility of my apps.  (I now can correctly re-size between iPhone 5 and pre-iPhone 5 layouts).  <\/p>\n<p>The biggest problem when going thru this, was that XCode kept trying to guess what I was trying to do.  It would pin objects to the top of the screen, which would then disappear beyond the bottom of the screen when I rotated the screen.  It would link two assets and then assume that I wanted the same spacing when I rotated, again pushing things around.  The biggest thing I learned was to treat your screen layout like a bunch of sub-views.  This allows you to then group things in subviews and build up relationships between the subviews.  It reminded me of hand coding websites years ago, right after HTML introduced tables. <\/p>\n<p>The other key thing to do, is make sure you pay attention to Less than, Equal, and Greater than.  This impacts how things will grow or shrink.  I cannot tell you how many times I caught myself with a Equal link(the default), when I wanted things to shrink down, a Less Than link.  So far I have not gone into the details of code centric autolayouts, but for my simple app, I didn&#8217;t need that yet.  <\/p>\n<p>I can try and address questions if you have any, so drop a comment to the blog!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, it was a challenge, but I got it done. This past weekend I spent most of the time refactoring my personal app to using iOS 6.1&#8217;s autolayout capabilities. While I started off pulling out my hair, I ended the weekend with screens that looked pretty good, and that correctly handled almost everything I could [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"hide_page_title":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2],"tags":[43,94,220,373,446],"class_list":["post-689","post","type-post","status-publish","format-standard","hentry","category-blog","tag-autolayout","tag-constraints","tag-ios6","tag-storyboards","tag-xcode"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2aMa8-b7","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/comments?post=689"}],"version-history":[{"count":1,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/689\/revisions"}],"predecessor-version":[{"id":2877,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/689\/revisions\/2877"}],"wp:attachment":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/media?parent=689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/categories?post=689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/tags?post=689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}