whenever you have dark background, you need to set the status bar color as white.
In order to make this happen, you can use following function in your vc.
override var preferredStatusBarStyle: UIStatusBarStyle{
return .lightContent
}
However if your view controller is rooted by navigation controller, this method does not work.
Instead you can use this settings.
navigationController?.navigationBar.isHidden = true
navigationController?.navigationBar.barStyle = .black
'Programming > Swift' 카테고리의 다른 글
[Readable Coding Practice] How to make swiping view controller with swiping menu tab bar (0) | 2021.08.01 |
---|---|
[Readable Coding Practice] eliminate empty UItableView cells (0) | 2021.06.28 |
[Readable Code Practice] tableView Cell slide and delete (0) | 2021.06.28 |
[Readable Coding Practice] Show and dismiss loading signals (0) | 2021.06.19 |
[Readable Coding Practice] UIScrollView Pagination (0) | 2021.06.19 |