I use class UIDocumentInteractionController for two cases.

   1. I want iOS to show the Open-In panel which lists *ALL* apps
   supporting open-in with a JPEG/PNG files.
   2. I want iOS to show the Open-In panel which only has an Instagram icon
   in it.

For the first case, I use the following code:

_documentController = [UIDocumentInteractionController
interactionControllerWithURL:url];

[_documentController setDelegate:self];

[_documentController presentOpenInMenuFromRect:_originRect inView:view
animated:YES];



For the second case, I use the following code:


NSURL* toInstagramURL = [url URLByDeletingPathExtension];

toInstagramURL = [toInstagramURL URLByAppendingPathExtension:@"igo"];

[fileManager moveItemAtURL:url toURL:toInstagramURL error:nil];


_documentController = [UIDocumentInteractionController
interactionControllerWithURL:url];

[_documentController setDelegate:self];

[_documentController setUTI:@"com.instagram.exclusivegram"];

[_documentController presentOpenInMenuFromRect:_originRect inView:view
animated:YES];




The above code works as expect on the following combination: Xcode 5 with
iOS 7, Xcode 5 with iOS 8. However, after I switched to Xcode, the first
piece stop working (meaning no panel being popped out) but the second still
works as before. It is quite surprising me that a specially-tailored
open-in panel (the second) still works but a wildcard one stops working
(the first).


I tried to modify the second piece by replacing the UTI from
@"com.instagram.exclusivegram" to @"public.png" , and it stopped working,
too.


How to fix the first case?


Thank you,

Dong
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to