I am attempting to display an Open In menu via UIDocumentInteractionController
and presentOpenInMenuFromBarButtonItem
. This does not bring up the UIDocumentInteractionController
on screen. The weird thing is that if I replace "OpenIn
" with "Options
" then it will work as expected.
What is causing presentOpenInMenuFromBarButtonItem
not to work? Thank you.
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