iOS: OpenInMenu from Qt UI (UIDocumentInteractionController)
Unsolved
Mobile and Embedded
-
just working on some more options for my sharing example app.
to display the native iOS OpenIn... Dialog:UIDocumentInteractionController* documentInteractionController = nil; documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:nsFileUrl]; UIViewController* qtUIViewController = [[[[UIApplication sharedApplication]windows] firstObject]rootViewController]; if(qtUIViewController!=nil) { [documentInteractionController retain]; if(![documentInteractionController presentOpenInMenuFromRect:CGRectZero inView: qtUIViewController.view animated: true]) { // do something } } }
I had to explicitely retain the
UIDocumentInteractionController
- without this the URL gets lost and I cannot open the file in another App.
I'm not so experienced with Obj-C, so my question is: do I also have to explicitely release the Controller - and if yes where should this be done.thx