使用UIImagePickerController后UINavigation Bar更改色调

时间:2013-12-04 00:44:16

标签: ios uinavigationbar

我有一个应用可以将照片附加到NSAttributedString中的textView。 UI设计有一个带有白色文本的蓝灰色导航栏。

然而,在我使用UIImagePicker之后,NavigationController的色调变为黑色文本。

- (void)showImagePickerForSourceType:(UIImagePickerControllerSourceType)sourceType
{
    _imagePickerController = [[UIImagePickerController alloc] init];
    _imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
    _imagePickerController.sourceType = sourceType;
    _imagePickerController.delegate = self;

    if (sourceType == UIImagePickerControllerSourceTypeCamera)
    {
        _imagePickerController.showsCameraControls = YES;

    }

    [self presentViewController:_imagePickerController animated:YES completion:nil];
}

我在发布UIImagePicker之前发布了一个视图图像,但是我没有足够的声誉点(我也不知道如何获取它们)。

我会在启动图像选择器并选择一个并从UIImagePicker返回之后发布图像,但同样没有足够的声誉点。

任何人都有任何想法,如果这是'正常'或iOS的错误?有关解决方法的任何建议吗?

P.S。如果你想看图像,我可以通过电子邮件发送给你。任何建议都表示赞赏。

2 个答案:

答案 0 :(得分:0)

这确实是一个错误,并且自iOS 7 beta 6(或更早版本)以来一直存在。

还有一些关于此问题的SO帖子有一些解决方案:UIImagePickerController breaks status bar appearance

答案 1 :(得分:0)

将picker的模态表示类更改为与全屏不同(例如UIModalPresentationPageSheet)可以避免此问题 代码:

imagePickerController.modalPresentationStyle = UIModalPresentationPageSheet;