Search code examples
iosios7uiimagepickercontrollermfmessagecomposeviewcontroller

Apple's controllers not presenting properly in iOS7


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];
    }

Solution

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