{"id":4485,"date":"2014-03-30T11:30:39","date_gmt":"2014-03-30T11:30:39","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/should-one-stop-loading-uiview-from-xibs-collection-of-common-programming-errors\/"},"modified":"2014-03-30T11:30:39","modified_gmt":"2014-03-30T11:30:39","slug":"should-one-stop-loading-uiview-from-xibs-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/should-one-stop-loading-uiview-from-xibs-collection-of-common-programming-errors\/","title":{"rendered":"Should one stop loading UIView from xibs?-Collection of common programming errors"},"content":{"rendered":"<p>You should only use child view controllers when you are building custom container view controllers, or your layout is very complex.<\/p>\n<p>Now for my opinion: I always use storyboards, because they allow you to express an entire screen all at design time without having to assemble it (like your code above) at runtime.<\/p>\n<p>So, even if you choose to use a storyboard for each individual view controller (some large teams do this to avoid merge problems), you can have all of your views and view controller laid out and connected together.<\/p>\n<p>If you are looking to create a dynamic number of a certain view at runtime, I probably would just code the view, or if its very complex, I&#8217;d store an NSNib in an ivar and instantiate each view from it.<\/p>\n<p>Bottom line: child view controllers in no way replace or are even related to your code sample of how you use to do it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You should only use child view controllers when you are building custom container view controllers, or your layout is very complex. Now for my opinion: I always use storyboards, because they allow you to express an entire screen all at design time without having to assemble it (like your code above) at runtime. So, even [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4485","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4485"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4485\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}