When I try use "ABPeoplePickerNavigationController" or "UIImagePickerController", in most cases it won't load up correctly. It will show part of the screen (transparent) starting in the middle of the screen in iOS 7 (ipad) for both simulator and device (screenshot below). In iOS 8 everything works correctly.
This is the code I use for ABPeoplePickerNavigationController:
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
self.preserveCurrentEntity = YES;
[self presentViewController:picker animated:NO completion:nil];
UIImagePickerController will break just for picking videos, but work for everything else, this is the code I use:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
switch (buttonIndex) {
case ImagePickerModeCamera:
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
break;
case ImagePickerModeAlbum:
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
break;
default:
break;
}
imagePicker.delegate = self;
NSMutableArray *mediaType = [[NSMutableArray alloc] init];
switch (self.actionSheetType) {
case ActionSheetTypeImage:
[mediaType addObject:(NSString*)kUTTypeImage];
break;
case ActionSheetTypeVideo: {
[mediaType addObject:(NSString*)kUTTypeMovie];
[mediaType addObject:(NSString*)kUTTypeVideo];
imagePicker.allowsEditing =NO;
}
break;
default:
break;
}
imagePicker.mediaTypes = mediaType;
[self presentViewController:imagePicker animated:NO completion:nil];
This is what happens in iOS7 when loading ABPeoplePickerNavigationController:
This is what happens in iOS8 when loading ABPeoplePickerNavigationController:
What is the solution to fix this?