xy.Niu
xy.Niu

Reputation: 1

After NavigationBarHidden,StatusBar so bad

If i set NavigationBarHidden = YES,I cannot set statusBackgroundcolor. So how can i solve this issue? enter image description here

Upvotes: 0

Views: 77

Answers (1)

Ketan Parmar
Ketan Parmar

Reputation: 27428

You can take a custom view of size (self.view.frame.size.width,20) and can place on the status bar. i.e at (0,0) origin. Then set background color to that view as you want status bar background color. And set proper constraint to that view if you are using autolayout. If you are using autolayout then your constraints for this custom view should be (top,leading,trailing and fixed height).

Upvotes: 1

Related Questions