I've got a custom UIViewController th开发者_Python百科at 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?
Try creating it and calling [controller view]. This will load its xib and create and hook up its view outlet, etc.
精彩评论