I have a UIlabel
that shows a countdown and an observer:
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("willEnterForeground:"), name:UIApplicationWillEnterForegroundNotification, object: nil)
The problem is willEnterForeground()
fires only after the view has become visible. If in that function I put a new value for the label like timerLabel.text = "blah"
, the user (on returning the app to foreground) will first see the value the label had on entering background, and only after like half a second the label text will be updated.
Is there a way to update views before they become visible?