1

ユーザーが iPad のフォト ライブラリから画像を選択できるようにするアプリを作成しようとしています。オンラインのソースがそうすべきだと言っているとおりに実行しましたが、ボタンをクリックすると、画面に矢印だけが表示され、他には何も表示されません。画像とともに表示されるはずのポップオーバーが表示されません。なぜこれが起こっているのか誰か教えてください。これが私のコードです:

        UIImagePickerController *picker = [[UIImagePickerController alloc] init];
        [picker setDelegate:self];

        [picker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
        [picker setAllowsEditing:YES];

        popoverController = [[UIPopoverController alloc] initWithContentViewController:picker];
        [popoverController presentPopoverFromRect:self.view.frame inView:[self view] permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
4

1 に答える 1