1. Change the StatusBar text color of a single page to white, dynamic changes can also be set here
-(Uistatusbarstyle) preferredstatusbarstyle { return uistatusbarstylelightcontent;}
2. Change the StatusBar text color of all pages to white
plist file in view controller-based status bar appearance set to NO
In this case, change the text color of a single page to black
-(void) viewwillappear: (BOOL) Animated { = uistatusbarstyledefault;} -(void) viewwilldisappear: (BOOL) animated { [Super viewwilldisappear:animated]; = Uistatusbarstyledefault;}
3. ScrollView slide to change the text color of StatusBar
-(void) Scrollviewdidscroll: (Uiscrollview *) scrollView { = scrollview.contentoffset.y; [Self setneedsstatusbarappearanceupdate]; // Update StatusBar color, call Preferredstatusbarstyle }- (Uistatusbarstyle) preferredstatusbarstyle { if136) { return uistatusbarstylelightcontent; } return Uistatusbarstyledefault;}
IOS statusbar status bar text color change