2
UIDocumentInteractionController
및 presentOpenInMenuFromBarButtonItem
을 통해 열기 메뉴를 표시하려고합니다. 화면에 UIDocumentInteractionController
이 표시되지 않습니다. 이상한 점은 만약 ""을 "Options
"으로 대체하면 예상대로 작동한다는 것입니다.presentOpenInMenuFromBarButtonItem : 메뉴가 나타나지 않습니다.
presentOpenInMenuFromBarButtonItem
이 작동하지 않는 이유는 무엇입니까? 고맙습니다.
NSString *fileName = [NSString stringWithFormat:@"%@text.txt", NSTemporaryDirectory()];
[self.textToShare writeToFile:fileName
atomically:NO
encoding:NSUTF8StringEncoding
error:nil];
NSURL *textFileURL = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"text.txt"]];
self.openInController = [UIDocumentInteractionController interactionControllerWithURL:textFileURL];
self.openInController.delegate = self;
[self.openInController presentOpenInMenuFromBarButtonItem:self.buttonToPresentFrom animated:YES]; //replacing OpenIn with Options causes it to appear