Iām moving on to an existing iOS 7 application. This is a tab bar application, and on each tab there is a table view controller built into the navigation controller. I use a storyboard and turn on Customize Scrolls, and I use a translucent navigation bar. Everything looks fine when I run the application. The contents of the table look good under the navigation bar.
When I simulate a memory warning, table views that are not being viewed are offloaded. When they reload, the top of the table view is now under the navigation bar. A warning also appears on the console before loading the view:
Limiting the length of the top layout guide unexpectedly lost its container. Did the application remove all the restrictions from the view of the view controller (which would be an application error)?
I do not use the machine, but turning it on did not matter. Calling [self setEdgesForExtendedLayout: UIRectEdgeNone] in viewDidLoad solves the problem, but then I don't get a nice effect from the background displayed through the navigation bar.
Why is the behavior different when rebooting after a memory warning? What causes a top layout restriction warning? Any clues on how I could fix this are greatly appreciated.
source share