I am trying to make my status bar background color the same as my navigation bar, I was trying to find the answer in google but it does not work clearly for me... Can you please explain how it works and how can I fix it?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- SwiftUI: UIImage (QRCode) does not load after call
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Using if let syntax in switch statement
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Enum with associated value conforming to CaseItera
- Swift - hide pickerView after value selected
- Is there a Github markdown language identifier for
Goto your app info.plist
1) Set View controller-based status bar appearance to NO 2) Set Status bar style to UIStatusBarStyleLightContent
Then Goto your app delegate and paste the following code where you set your Windows's RootViewController.
It looks to me like you have a
UINavigationBar
up there, which is what's causing the gap at the top. If you are able to, embed your view controller in aUINavigationController
instead, then set your navigation item buttons in code. This gives you the same effect, but also automatically ensures the status bar matches the look of its navigation bar.