我正在展示 UIActivityController 但它在屏幕上显示一半。
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)
您是否尝试在当前 ViewController
上而不是 self.navigationController
上 self.presentViewController
。
我曾经遇到过这个问题,因为我的 rootViewController
较大,因此在使用 self.navigationController
进行演示时,它会被切断。
关于ios - UIActivityController 没有全屏显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41458440/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |