Ето UIDocuemtnInteractionController от моето приложение (не показва опцията за поща)
Ето този, който примерният проект на Apple използва
Ето и съответните кодове
Моето приложение
docInteractionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
[docInteractionController presentOpenInMenuFromBarButtonItem:(UIBarButtonItem*)sender animated:YES];
Примерен проект на Apple
NSURL *fileURL;
if (cellIndexPath.section == 0)
{
// for section 0, we preview the docs built into our app
fileURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:documents[cellIndexPath.row] ofType:nil]];
}
else
{
// for secton 1, we preview the docs found in the Documents folder
fileURL = [self.documentURLs objectAtIndex:cellIndexPath.row];
}
self.docInteractionController.URL = fileURL;
[self.docInteractionController presentOptionsMenuFromRect:longPressGesture.view.frame
inView:longPressGesture.view
animated:YES];
КАКВО ТРЯБВА ДА НАПРАВЯ, ЗА ДА ПОЛУЧА ОПЦИЯТА ЗА ПОЩА?