English 中文(简体)
确保在申请之前先开始采用氮中的物体 DidFinishLaunching
原标题:Making sure that objects in nibs are initialized before applicationDidFinishLaunching

并感谢你审视我的问题。

i 我有两名控制器,每个有自己的刀子。 1 控制器的例子存放在主Window.xib,2个控制器的例子是主计长。

有办法确保控制员2在发出指定代表申请之前先启动。 国防军吗?

与其他许多观点控制者相比,实际设置更为复杂,因此实际上不想把所有东西都放到主妇dow中。 除此以外,还将减少可再使用性。

再次感谢!

问题回答

是否有办法确保控制器2在发送指定代表之前先启动?

页: 1 当然,或许是肯定的,但它并不认为控制者应如何工作。 观点控制员会推迟装货,因为装货是相当昂贵的作业,直到真正认为有必要。 因此,如果需要<代码>控制器2 右铭是<> 申请编号>DidFinishLaunching,请您将其放在另一个观点控制人的控制区。

如果我是你,我将停止在刀子档案中抽调观察控制员,并像在<条码>应用DidFinishLaunching:内创建。

-(void)applicationDidFinishLaunching:(UIApplication *)application
{
     ....
     self.controller2=[[Controller2 alloc] init... ];
     ....
}

我认为,“应用守则”是你控制守则的绝对切入点。 这可能是装上任何东西的最早地点。





相关问题
How do you create UIBarButtonItems with a radio interface?

I have a UIToolbar that needs three buttons in a radio style, meaning that of the three, only one button can be pushed at a time. The documentation makes reference to the possibility of setting up ...

iPhone settings bundle

I want to allow the user to enter a valid date using the iPhone’s settings application. I have experimented with many of the PreferenceSpecifiers data node types including date. I have two issues: ...

Circular #import/@class problem in ObjectiveC

I m going to use an example to properly illustrate my confusion. I can t quite wrap my head around this. In Cocoa touch, we have UIViewController and its subclass, UINavigationController. Now, UIVC ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Cocoa-Touch: issue looping MPMoviePlayerController

I have an app which has to load some data at startup, so I want to display a splash-screen animation. I m using the MPMoviePlayerController to play a m4v file. The movie has it s background set to [...

Iphone sequential animation with setAnimationDelay

I m trying to chain animation events. The application I m coding for work has a multiple choice quiz. First you pick your multiple choice answer. The quiz view fades away. Then a label ("correct" or "...

热门标签