
ViewController나, NavigationBar의 배경색을 변경 하면 Statusbar의 배경색은 동일 하게 바뀐다.
문제는 어둡게 변경되었을 경우 Black의 폰트는 시인성이 떨어진다.
그럼 이렇게 어두운 배경톤을 사용하는 앱에서 statusbar의 text 색상을 어떻게 바꾸나

info.plist에 View controller-based status bar appearance 이항 목을 추가 하고 값을 NO로 설정 하한다.
AppDelegate.swift 파일에서 didFinishLaunchingWithOptions 함수에 다음 코드를 추가 한다.
UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: false)
그러면 원하는 대로 어두운 배경색의 statusbar에서 white 색상에 폰트와 text를 얻을 수 있다.
댓글 없음:
댓글 쓰기