There are many view that share a common part in my current project so I just visualize a way to encapsulate the common part into a nib file that could be shared by many controllers by embedding it to their corresponding nib file. 开发者_StackOverflowAlthough I know how to do it programmatically, I still believe there should be a way to achieve this simply in Interface Builder. Are there anyone who has achieved this and would you like to point the way out?
You can add in your NIB file a view called "Content", for example. In your code, the only thing you need to do is add your new UIViewController's view inside the "Content"'s view. This way, you can achieve a view that holds common data, while the only thing you do is to change the view inside the "Content"'s view.
精彩评论