Monday, 14 January 2019

Various Ways to Create UIView and UIViewController

Check UILab playground project:
https://github.com/Sylvia-YiyinShen/UILab


Ways to create UIViewController

1.  Just by code


2. From Nib/Xib

Note: It is possible to load from another nib, however app will crash when you try to access a component that doesn't exist in the nib file or has not been linked to code.

3. From Storyboard


Note: Requires class and storyboard id to be configured in Identity Inspector




Ways to create UIView

1. Just by code



2. From Nib/Xib



An extension function for UIView



No comments:

Post a Comment