UIToolbar position change after app enters foreground
in my navigation based iPhone app I let users swipe the UIToolbar out of the way (I move the frame of self.navigationController.toolbar down by 23).
This works very well until the app is sent into background and reopened. When the app comes back to foreground the toolbar position is reset. This happens after UIApplicationWillEnterForegroundNotification is posted and after - (void)didBecomeActive …
At the moment I move the toolbar back to the lower position after entering foreground, but this results in kind of a flickering effect.
Could someone please push me in the righ开发者_开发问答t direction how I can prevent the toolbar position reset on entering foreground?
Thanks!
Don't manually change the frame of the toolbar. Call -[UINavigationController setToolbarHidden:animated:]
instead.
精彩评论