iphone - Open Instagram only in UIDocumentInteractionController -


my application required post image instagram, used uidocumentinteractioncontroller open image file saved in documents directory extension .igo. set com.instagram.exclusivegram uidocumentinteractioncontroller's uti property. worked fine, problem when use

[dic presentopeninmenufromrect:cgrectzero inview:self.view animated:yes]; 

to open uidocumentinteractioncontroller, shows pdf reader, dropbox etc. have hide other options instagram or show instagram only. , how identify cancel button press in presented menu.

  1. why uidocumentinteractioncontroller showing other options?

    if you're using code snippet internet, make sure implemented delegate method correctly.

    -(uidocumentinteractioncontroller *)setupcontrollerwithurl:(nsurl *)fileurl                                               usingdelegate:(id<uidocumentinteractioncontrollerdelegate>) interactiondelegate  {     // if you're creating new instance here,     // make sure set properties correctly     uidocumentinteractioncontroller *interactioncontroller = [uidocumentinteractioncontroller interactioncontrollerwithurl:fileurl];     // remember set again here     interactioncontroller.uti = @"com.instagram.exclusivegram";     interactioncontroller.delegate = interactiondelegate;         return interactioncontroller; }  
  2. how can know if user cancel action or proceed instagram?

    please refer answer of thread: uidocumentinteractioncontroller open menu cancelled callback.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -