2 ms·
So your storyboard just defines segues and types, then your view controllers call initWithNib? That sounds very reasonable. I find IB to be excellent for creat
by programmarchy 8y ago
So your storyboard just defines segues and types, then your view controllers call initWithNib?
That sounds very reasonable. I find IB to be excellent for creating layouts quickly, especially combined with @IBDesignable and @IBInspectable.
My problem with relying on storyboards has been when I need to reuse a layout in a separate workflows. What’s nice about your technique is that it allows separate storyboards but also layout reuse with nibs.
- jawngee 8y agoActually, iOS will automagically load your xib for your view controllers at runtime. - In the storyboard, delete the root view for the view controller. - Create a new xib named the same as the view controller's class and that will get loaded without having to do anything additional. Here's a quick example of what I'm talking about: https://github.com/jawngee/StoryboardWithXibs https://github.com/jawngee/StoryboardWithXibs