내 init ViewController는 상태 표시 줄의 색조를 흰색으로 표시합니다.iOS 변경 문서 선택기 상태 막대 색상이 변경되지 않습니다.
AlertertAction, presentViewController를 클릭해야합니다. UIDocumentPickerViewController 상태 표시 줄의 색조가 검은 색으로 변경됩니다.
...
cloudAction = [UIAlertAction
actionWithTitle:@"from cloud"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
[UINavigationBar appearance].tintColor = [UIColor blackColor];
[self presentViewController:cloudPicker animated:YES completion:nil];
}];
...
그리고 내 viewwillappear 방법은
-(void) viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[UINavigationBar appearance].tintColor = [UIColor whiteColor];
}
매우 이상하다 설정합니다. 경고를 클릭하면 내 클라우드 선택기 (UIDocumentPickerViewController)가 표시되고 통계 색조는 여전히 whiteColor (UIDocumentPickerViewController에서) 인 다음 선택기 취소를 클릭하면 내보기 컨트롤러가 흰색이 아닌 검정색을 변경합니다.
경고 조치를 클릭 할 때 통계 표시 줄 색조 색상이 변경되고 (검정색으로 변경됨) 선택기를 닫을 때 색상을 변경하는 방법을 아는 사람이 있으면 상태 표시 줄 색조에서 내보기 컨트롤러가 여전히 흰색입니다.
대단히 감사합니다.
'취소'를 누르면 'viewWillAppear' 메서드가 호출되고 있습니까? – 3stud1ant3
예,보기가 표시되는 메서드가 나타납니다. 그리고 그것은 매우 이상합니다. "[UINavigationBar appearance] .tintColor = [UIColor blackColor];" 검은 색, cloudPicker 상태 표시 줄 색조 색을 여전히 검정색이 아닌 흰색 색으로 표시합니다. – dickfala
'tintColor' 대신'barTintColor'를 시도해보고 동작이 무엇인지 확인해주십시오. – 3stud1ant3