Frage

I have 3 different ViewControllers that are inside a combination of methods to get one result. During the process I need to change smoothly with some kind of animation the background colour dynamically to show possible different user behaviours. The question is:

Is there any way to change all backgrounds at same time or will I need to check what colour I have each time in each one and pass it to the next view controller and continue the animation there?

War es hilfreich?

Lösung

If you're asking if you can change the background on view controllers that are not yet loaded or on view - you can. However you need to pass the info to the view controller when you're about to display it on screen to the user. Then change colours in viewWillAppear or ViewDidLoad.

Andere Tipps

If your viewcontrollers are loaded. You can use NSNotification. look this link Send and receive messages through NSNotificationCenter in Objective-C?

Wherever you want to change color write the receiveNotification code in viewDidLoad and call a method with it.

May be it will work for you.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top