私は自分のアプリで iBooks ライブラリの PDF ファイルを開こうとしている Objective-C 初心者です。
次のコードを使用します - 開いているダイアログを作成しているように見えますが、エラーが発生します - 「ウィンドウのないビューからポップオーバーを表示できません。」これを修正する方法がわかりません...ここで何が間違っていますか?
- (void) showOptionsMenu
{
NSURL *fileURL = [NSURL fileURLWithPath:@"ibooks://test.pdf"];
docController = [self setupControllerWithURL:fileURL usingDelegate:self];
bool didShow = [docController presentOptionsMenuFromBarButtonItem:self.toolbarItems[0] animated:YES];
if(!didShow)
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"Sorry, app not found" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
}