开发者

iPhone - preload xib

开发者 https://www.devze.com 2022-12-20 19:34 出处:网络
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 t

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消