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.

enter image description here

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

enter image description here


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -