image picker
iPad用のポップオーバーを作成しました。この機能は動作します。ただし、 をUIBarButton
2 回押すと、アプリケーションがクラッシュします。
@property (retain) UIPopoverController *popoverController1;
-(IBAction)photos:(id)sender {
test = false;
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.wantsFullScreenLayout = NO;
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.allowsEditing = YES;
self.popoverController1 = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
_popoverController1.delegate = self;
[_popoverController1 setPopoverContentSize:CGSizeMake(1024, 500)];
[self.popoverController1 presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
何か提案はありますか?