UIDocumentInteractionController に問題があります。presentOptionsMenuFromBarButtonItem を使用して、ポップオーバーを正しく表示できます。
ユーザーが barbuttonitem に触れると、次のメソッドが起動します。
- (IBAction)share:(id)sender {
if (docIntController) {
[docIntController dismissMenuAnimated:NO];
docIntController = nil;
}
NSString *fileURL = [(Documents *)(self.detailItem) url];
NSArray *subStrings = [fileURL componentsSeparatedByString:@"/"];
NSString *filePath = [[self documentsDirectory] stringByAppendingPathComponent:[subStrings lastObject]];
docIntController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:filePath]];
docIntController.delegate = self;
docIntController.UTI = @"com.adobe.pdf";
[docIntController presentOptionsMenuFromBarButtonItem:sender animated:YES];
}
とにかく、ユーザーが印刷ボタンに触れてからもう一度バーボタンに触れても、次の画像でわかるように、印刷オプション メニューは消えません。
さらに、ユーザーが再度印刷オプションに触れると、オプション ポップオーバーが消え (古い印刷オプションではなく)、別の印刷オプション ポップオーバーが作成されます。
実際、ユーザーがポップオーバーの外側に触れて閉じると、最初のものだけが閉じられ、下に示すように古いものは空になります。