Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. iOS: OpenInMenu from Qt UI (UIDocumentInteractionController)
QtWS25 Last Chance

iOS: OpenInMenu from Qt UI (UIDocumentInteractionController)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
iossharing
1 Posts 1 Posters 668 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ekkescorner
    Qt Champions 2016
    wrote on 20 Jul 2018, 15:01 last edited by
    #1

    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

    ekke ... Qt Champion 2016 | 2024 ... mobile business apps
    5.15 --> 6.8 https://t1p.de/ekkeChecklist
    QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

    1 Reply Last reply
    0

    1/1

    20 Jul 2018, 15:01

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved