你好,歡迎來到IOS教程網

 Ios教程網 >> IOS編程開發 >> IOS開發綜合 >> iOS Dev (53) 修復UIImagePickerController偷換StatusBar顏色的問題

iOS Dev (53) 修復UIImagePickerController偷換StatusBar顏色的問題

編輯:IOS開發綜合

iOS Dev (53) 修復UIImagePickerController偷換StatusBar顏色的問題

  •  
  • - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
    {   
        // bug fixes: UIIMagePickerController使用中偷換StatusBar顏色的問題
        if ([navigationController isKindOfClass:[UIImagePickerController class]] &&
            ((UIImagePickerController *)navigationController).sourceType ==     UIImagePickerControllerSourceTypePhotoLibrary) {
            [[UIApplication sharedApplication] setStatusBarHidden:NO];
            [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
        }
    }
    

    Reference

    • http://my.oschina.net/megan/blog/167500
    • http://www.vinqon.com/codeblog/?detail/11109
  1. 上一頁:
  2. 下一頁:
蘋果刷機越獄教程| IOS教程問題解答| IOS技巧綜合| IOS7技巧| IOS8教程
Copyright © Ios教程網 All Rights Reserved