Question

In my iOS app i present standerd controllers MFMessageComposeViewController and UIImagePickerController.

But they both presenting with strange navigation bar.

enter image description here

enter image description here

enter image description here

How can i fix this problem?

UPD code for presenting controllers

UIImagePickerController:

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];
    }
Était-ce utile?

La solution 2

See this question. I used the second answer, though I suspect the first would work for me also.

Autres conseils

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/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top