質問

I have Latitude/Longitude check and question asked from app delegate as the latitude and longitude needs to be set and a piece of code needs to be run in app delegate before the viewDidLoad runs in the View controller since I have a set of labels/etc that depend on the code run in app delegate with the latitude and longitude

At the moment the question gets asked and it goes straight into viewDidLoad before receiving user input.

Any ideas?

役に立ちましたか?

解決

You have to go straight to the viewDidLoad of your first view controller. That's not an option.

If anything, you could delay showing the elements of the view until the user selects the option you ask for in your app delegate. Perhaps add a replicate of your launch image over the view during viewDidLoad to block the elements underneath, then when the user makes their decision in the alert presented by the app delegate, trigger a method in the view controller to unhide the elements.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top