views:

234

answers:

1

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
As odd as it may seem, this didn't help.
quano
are you sure you're optimizing in the right spot?
Ben Gottlieb
What do you mean?
quano
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