在上图中,我得到了这个带有导航栏的弹出框,但是导航栏与内容重叠,我找不到使内容位于导航栏下方的方法。弹出框的内容是从设备库中获取的。
这是获取内容并显示它的代码:
UIImagePickerController *photosMedia = [[UIImagePickerController alloc] init];
photosMedia.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
photosMedia.delegate = self;
popoverController=[[UIPopoverController alloc] photosMedia];
popoverController.delegate = self;
popoverController.popoverContentSize = CGSizeMake(300, 400); // 768 400
imagePickerController.modalPresentationStyle = UIModalPresentationFullScreen;
[popoverController presentPopoverFromRect:btnPhotos.bounds
inView:btnPhotos
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];