0

在我的 iOS 应用程序中,我提供了标准控制器 MFMessageComposeViewController 和 UIImagePickerController。

但他们都呈现出奇怪的导航栏。

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

我该如何解决这个问题?

用于呈现控制器的UPD代码

UIImagePicker控制器:

UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init];
    cameraUI.sourceType = sourceType;
    cameraUI.allowsEditing = YES;
    cameraUI.delegate = self;
    [self presentViewController:cameraUI animated:YES completion:nil];

MFMessageComposeViewController:

MFMessageComposeViewController *messageViewController = [[MFMessageComposeViewController alloc] init];
    if([MFMessageComposeViewController canSendText]) {
        messageViewController.view.backgroundColor = [UIColor whiteColor];
        messageViewController.messageComposeDelegate = self;
        recipient= [NSStringMask maskString:recipient withPattern:@"\\+(\\d{1}) \\((\\d{3})\\) (\\d{3})-(\\d{2})-(\\d{2})"];
        messageViewController.recipients = @[recipient];
        messageViewController.body = body;
        [self presentViewController:messageViewController animated:YES completion:nil];
    }
4

2 回答 2

2

In iOS 7, the status bar and the navigation is translucent by default. To make the view act 'normal' like in iOS 6. you need to add this to the controller you are presenting.

if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
        self.edgesForExtendedLayout = UIRectEdgeNone;

If you want to read up more about changes in views. Check out this post. I find it a nice quick overview whats changed.

http://www.brianjcoleman.com/ios7-weve-got-a-problem/

于 2013-10-14T09:55:00.857 回答
1

看到这个问题。我使用了第二个答案,尽管我怀疑第一个答案也对我有用。

于 2014-01-10T21:38:44.467 回答