i using uinavigationcontroller root view , pushing uiviewcontroller instances onto stack.
my view controllers derived base, draws radial gradient background during viewwillappear.
with navigationbar.translucent property set no/false first view controller pushed onto stack has it's view frame's y component set height of navigationbar, creating blank space between nav bar , view's contents. subsequent view controller's pushed onto stack not have issue.
i overrode pushviewcontroller in navigation controller , set navigationbar.translucent yes if navigationcontroller.viewcontrollers array empty. doing gets rid of space on first view controller isn't want don't want translucent nav bars.
i printed out view's frame during various life cycle phases , first view has it's y component modified, additional views have frame y set 0. not modifying root view frame in of view controllers.
my question is, doing wrong? know issue first view controller because of override since don't see tons of posts assume did wrong.
my question similar this: container view getting pushed down if had uinavigationbar?
you need set adjust scroll view insets
false. fix try:
interfacebuild: https://stackoverflow.com/a/26567240/846780
code: self.automaticallyadjustsscrollviewinsets = no;
Comments
Post a Comment