I've got a custom UIViewController that loads a xib. The first time it's instantiated, it takes some time before it appears. Is there an elegant way to preload it, so it won't do this? I tried just creating it and immediately after release it. That didn't seem to work. I suppose if I wanna do it that way, I'd have to add it to the main window (for example), and then remove it. But in any case, that solution seems a bit ugly. Any other way?
A:
Try creating it and calling [controller view]. This will load its xib and create and hook up its view outlet, etc.
Ben Gottlieb
2010-02-18 21:21:32
As odd as it may seem, this didn't help.
quano
2010-02-18 21:57:28
are you sure you're optimizing in the right spot?
Ben Gottlieb
2010-02-19 02:18:12
What do you mean?
quano
2010-02-19 14:30:55
You said you want to speed up your app by pre-loading the view controller. It may be that this is not the best way to speed it up, and you may need to look elsewhere.
Ben Gottlieb
2010-02-19 15:45:07