ios - setting navigationcontroller bar to opaque moves detail scroll view down -
i using search bar plus controller uitableview in mastercontroller. when view shows up, navigationbar in mastercontroller black until view loads (not sure why?). in order fix set self.navigationcontroller.navigationbar.translucent = false;
fixed issue having navigation bar being black initially, looks when click cell in uitableview of mastercontroller, content in detailview loads shifts down approximately size of search bar, it's blank space above content has been shifted... when remove translucent property in mastercontroller content in detailview fine , not shifted...
so question is, shifting content down , how can stop content being shifted , having opaque navigation bar...
in ios 7, default view controller's view extends under translucent navigation bar when contained in uinavigationcontroller not on opaque one. set extendedlayoutincludesopaquebars
property of view controller if want extend under opaque nav bars too.
when scroll view shifted on detail view controller it's because y origin not set 0 offset view extending under translucent nav bar, because nav bar opaque , view not extending under space visible.
one thing more view controllers automatically add insets on scroll views contain there contents not obscured when view controllers view extends under navigation bars. set automaticallyadjustsscrollviewinsets property default set yes.
Comments
Post a Comment