A very good question and a great time, since I have been working on something similar in the last few days.
Now I'm not sure if this solution will help you, 300 ms, but theoretically it is faster.
(You will see both “XIB” and “NIB.” I mean the same thing. After all, NIB is a “compiled” XIB.)
The key to this is to prevent each XIB file from being downloaded multiple times. There is no reason for this, since what you (we) mainly need from it are instances from objects in the XIB, and not the XIB itself, which takes up memory.
Fortunately, the iOS SDK provides a UINib class that can do what we want. With this class, we can create multiple instances of XIB content without having to load each XIB every time, only once at the "beginning".
Here's how to do it:
First create a UINib object for each XIB file you want.
Secondly, after loading NIB into memory, now you can get objects from it.
abcuiNib.InstantiateWithOwneroptions(this, new NSDictionary());
Pay attention to the "this" parameter. Since this is the view controller that you want to load, the above line should be somewhere at the beginning of the object's life cycle, for example, in the constructor:
public partial class ABCViewController : UIViewController { public ABCViewController() {
Remember, I have not tested the above, since so far I have tested it using separate objects in XIB. If (and when) I use it with UIViewControllers in XIB, this is the direction I will go. I will also prepare an article with more detailed results and information in due time.
Also note that the same “rules” apply, for example. you still have to release all outputs in the ViewDidUnload override.
If after that you do not find a performance improvement, I think you will need to redesign your XIB. Apple suggests better to have multiple XIBs with multiple objects in each, rather than multiple XIBs packed with objects.
Helpful Reading: Apple's NIB Management Docs