네이티브 앱에서 네비게이션바 색상이나 상태바 색상을 바꾸는 경우가 많다.
스토리 보드에서 바꾸는 방법도 있지만 신기하게 상태바와 네비게이션 바 색상이 미세하게 다른경우가 있다
그래서 코드로 새로 작성한다
RGB 값을 HEX 값을 사용하기 위해 UIColor를 확장하며 해당 셋팅은 BaseController 에서 사용 하였다 (일반 Controller 에서 사용가능)
----------------------------------------------------------------------------------------------------------------------------
1. UIColor 확장
2. 상태바 색상 변경 (StatusBar)
3. 네비게이션바 색상 변경 (텍스트 색상 포함)
출처 : https://freakycoder.com/ios-notes-13-how-to-change-status-bar-color-1431c185e845
iOS Notes 13: How to change Status Bar Color on iOS 13 and Below? [UPDATED v2]
You can change the status bar colour just with a single line of code.
freakycoder.com
https://sarunw.com/posts/uinavigationbar-changes-in-ios13/
UINavigationBar changes in iOS13 | Sarun
Apple brings a lot of appearance changes in iOS13, and the navigation bar is one of them. Cover everything you should know once you build your app against iOS13 (Xcode11).
sarunw.com
'IOS' 카테고리의 다른 글
Multiple commands produce 문제를 해결해보자 (0) | 2020.06.23 |
---|---|
TextField에 글자수 제한을 달아보자 (0) | 2020.02.21 |
Alamofire 라이브러리에 timeout 을 달아보자 (0) | 2020.02.18 |
dyld: Library not loaded 문제을 해결해보자 (0) | 2020.02.18 |
IOS에 데이터 값을 저장하여 화면전환을 달아보자 (1) | 2019.09.15 |