OGeek|极客世界-中国程序员成长平台

标题: ios - UIActivityController 没有全屏显示 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 18:29
标题: ios - UIActivityController 没有全屏显示

我正在展示 UIActivityController 但它在屏幕上显示一半。 enter image description here

 let textToShare = "This is awesome!  Check out this website about it!"
    if let myWebsite = NSURL(string:urlShare) {
        let objectsToShare = [textToShare, myWebsite]
        let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
        //New Excluded Activities Code
        activityVC.excludedActivityTypes = [UIActivityTypeAirDrop, UIActivityTypeAddToReadingList]

        self.navigationController!.presentViewController(activityVC, animated: true, completion: nil)



Best Answer-推荐答案


您是否尝试在当前 ViewController 上而不是 self.navigationControllerself.presentViewController

我曾经遇到过这个问题,因为我的 rootViewController 较大,因此在使用 self.navigationController 进行演示时,它会被切断。

关于ios - UIActivityController 没有全屏显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41458440/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4