in my iPad app i am opening Photo Library in a popover controller. It was working fine in iOS 4 but now its not opening up in iOS 5. i am using the following code for opening Photo Library,
UIImagePickerController* picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.delegate = self;
picker.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
popOver = [[UIPopoverController alloc] initWithContentViewController:picker];
popOver.delegate = self;
int w = 320;
CGRect pickerFrame = CGRectMake(0, 0, w, bImportPicker.frame.origin.y);
[popOver setPopoverContentSize:pickerFrame.size animated:NO];
[popOver presentPopoverFromRect:pickerFrame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
[picker release];
In my code, I had a UIImageView, whenever I tapped on that, the PickerView with Images from iPhone Library gets opened in PopOverController.
}
Happy coding.
When my poor customers moved to iOS 5, their UIPopoverController was being drawn off the edge of the screen. This is because iOS 5 differs from iOS 4 in its interpretation of presentPopoverFromRect's first parameter. When I made sure the supplied rect leaves enough room for your UIImagePickerController between the rect and the edge of the display, the problem was resolved. Using the entire display for the rect will produce this misbehavior, which resembles what you've described.