UIImagePickerController with PopOver not working on iPad Device
I am using the UIImagePickerController for picking the image and use the
image in ipad application it works fine on simulator but it does not open
imagepickerController in device here is my code
else if([labelType.text isEqualToString:@"Select Image"]){
selectedType=@"Select Image";
BOOL isiPhone;
UIImagePickerController *pckrImage = [[UIImagePickerController
alloc] init];
pckrImage.delegate = self;
if (isiPhone) {
if ([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypePhotoLibrary])
{
pckrImage.sourceType =
UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:pckrImage animated:YES];
}
else {
}
}
else
{
popOver = [[UIPopoverController
alloc]initWithContentViewController:pckrImage];
[popOver presentPopoverFromRect:CGRectMake(450.0f, 825.0f,
10.0f, 10.0f) inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionDown
animated:YES];
}
}
No comments:
Post a Comment