상태 표시 줄의 배경색을 변경하고 해당 배경색이 탐색 모음 배경색, 즉 어두운 회색 색상과 같아야합니다. 내 문제는 상태 표시 줄과 내 아래 코드를 사용하여 탐색 모음에 동일한 색상을 부여한 후, 나는 다른 색상을 받고있다. 이미 UIViewControllerBasedStatusBarAppearance를 NO로 설정했습니다. 제발 내가 잘못하고있는 곳을 제안 해주세요, 나는 당신의 참고를 위해 이미지 아래에 붙어있다. UIStatusBarStyleLightContent
는 [UIColor darkGrayColor]
과 같은 색이 아니기 때문에왜 iOS에서 상태 표시 줄과 탐색 모음 배경색이 다른지
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
//For changing status bar background color
self.window.backgroundColor = [UIColor darkGrayColor];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
//For changing navigation bar background color
[[UINavigationBar appearance] setBackgroundColor:[UIColor darkGrayColor]];
[[UINavigationBar appearance] setTintColor:[UIColor darkGrayColor]];
'UIStatusBarStyleLightContent'는 (는)'[UIColor darkGrayColor] '와 (과) 동일합니까? –
sry .. 참조 용 스크린 샷을 첨부하고 있습니다. –