Implement the following illustration:
Add Uidocumentinteractioncontrollerdelegate to your. h file
Then, in the. m file, create a new method that responds to pop-up Popview when you click the button, which lists other applications that open the current file.
My method is as follows
-(void) opendocumentin{
documentcontroller = [Uidocumentinteractioncontroller interactioncontrollerwithurl:[ Nsurl Fileurlwithpath:unencodingurl]];
Documentcontroller.delegate = self;
Documentcontroller.uti = @ "Com.microsoft.word.doc";
[Documentcontroller Presentopeninmenufromrect:cgrectmake (760, MB) inView:self.view Animated:yes];
}
which
"1" documentcontroller.uti that those types of files support the opening of Third-party software, which has various types of files corresponding to the parameters https://developer.apple.com/library/mac/# Documentation/miscellaneous/reference/utiref/articles/system-declareduniformtypeidentifiers.html
You can set this value dynamically according to the file suffix name in Unencodingurl
"2" rect according to their own needs to write