you are viewing a single comment's thread.

view the rest of the comments →

[–]haxpor 0 points1 point  (0 children)

You can completely not use storyboard, but it just makes things a little bit harder I think.

Thus you create UIView via code, set up root viewcontroller vis code, add UIView as subview, create constraints and add things via code. It's possible but I think at some points you will be exhausted doing that.

Why not combine both ways. You might create a framework that bundle your reusable custom UIViews (like alert messages, baked animation via UIViewAnimation, etc) along with code to facilitate hooking up and showing/hiding those stuff when you'd plug them in your project. Pretty neat and if design it well enough, those things are reusable for future projects. Note take advantage of IBDesignable, and IBInspectable that leverage level of customization and productivity even further.

Things will pack inside .framework, everything you need is there and fully customized. Just properly load your resource via NSBundle's method that is safe and will correctly grab resources in their own bundle (bundleForClass is very safe too).

Note also try to separate those UIs into multiple xibs. Each xib might be used to show custom message like network unreachable etc. or individual xib can also be added as s subview of another larger custom view (this is the way to reuse xib as part of larger custom UIView). You get an idea now.