开发者

iPhone : Wait for users to complete or dismiss view in AppDelegate

I'm in the process of adding a method that changes core application settings and as a result needs to be initiated very early in the code execution, this will only be displayed during the development phases of the application.

I've created a view that allows the users to set / change the required settings and the 'addview' in the 'applicationdidFinishLaunchingWithOptions' method.

What I'm struggling wi开发者_如何学JAVAth is waiting/pausing the appdelegate until the user has completed and dismissed the new view, i.e. display view and wait until the 'Done' button is pressed. Are there any ways to achieve this, the application is very complex and my new view changes values in the root.plist resulting in no code changes elsewhere in the application


Create a new protocol for your view controller and set the app delegate as the delegate for your view controller. In the code that handles the Done button, call your protocol method on the delegate.

In your app delegate, implement the protocol, and in the implemented protocol method, initialize the code for your app. It sounds like your initialization code is currently in applicationdidFinishLaunchingWithOptions.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜