ios - can't set to "UIBarPositionTopAttached" on navigationBar -
i made uiviewcontroller
have navigationcontroller
parent (connected in storyboard), , want apply picture of navigationbar statusbar background.
but seems statusbar can't state "translucent",
i tried set
- (void)viewwillappear:(bool)animated { [self.navigationcontroller.navigationbar setbackgroundimage:[uiimage imagenamed:@"bartop.png"] forbarposition:uibarpositiontopattached barmetrics:uibarmetricsdefault]; [self setneedsstatusbarappearanceupdate]; .... } - (uistatusbarstyle)preferredstatusbarstyle { return uistatusbarstylelightcontent; }
in uiviewcontroller
.
but backgrounds of navigation , status bar have been separated.
i try both make plist file "view controller-based status bar appearance" yes , no. still can't configure statusbar viewcontroller. couldn't find same problem in bulletin board .
does knows solution??or how debug?
thank reading.
(9/3 added: want make backgrounds navigationbar , statusbar.
and under simple condition there 1 navigationcontroller , 1 viewcontroller, both bars can make backgrounds (default).
now met wrong when make tabbarcontroller indicate multiple navigationcontroller storyboard.)
according apple status bar, status bar transparent.(i think* always, not sure). here link. https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/bars.html
Comments
Post a Comment