How to Just launch app from share extension without post popup in Swift?

我的未来我决定 提交于 2019-12-05 04:30:41

If you want to hide the dialog, you need to process data in viewDidLoad instead of didSelectPost, after that to redirect your app use this code:

           self.dismiss(animated: false, completion: {
               let _ = responder?.perform(selectorOpenURL, with: url)
               self.extensionContext!.completeRequest(returningItems: [], completionHandler: nil)
            })

Be sure that you set all flags and url scheme.

Add this in your share view controller. You're welcome.

override func viewDidAppear(_ animated: Bool) {
    self.view.transform = CGAffineTransform(translationX: 0, y: self.view.frame.size.height)

    UIView.animate(withDuration: 0.25, animations: { () -> Void in
        self.view.transform = .identity
    })
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!