Ipad UIImagePickerController and UIPopoverController error
Posted
by nishantcm
on Stack Overflow
See other posts from Stack Overflow
or by nishantcm
Published on 2010-05-12T12:53:47Z
Indexed on
2010/05/12
13:24 UTC
Read the original article
Hit count: 1590
Hi,
I am using this code to open a popover with imagepicker
-(IBAction)photosAction:(id)sender { // dismiss any left over popovers here UIImagePickerController* picker = [[UIImagePickerController alloc] init]; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; picker.delegate = self;
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:picker];
self.popoverController = popover;
popoverController.delegate = self;
[popoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
[picker release];
But this results in this error request for member 'popoverController' in something not a structure or union and this error 'popoverController' undeclared (first use in this function).
Also I want to dismiss the popover when the image is selected.
What code should I put in the following function to dismiss the popover once the image is selected.
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
Thanks for the help!
© Stack Overflow or respective owner