[英]How to achieve Live Streaming of videos in iOS (iPhone/iPad) using Kaltura?
[英]iOS: Why the share of medias (images, videos or pdf) works on iPhone but not on iPad?
我有一段代码可以在iPhone上很好地工作,但是在iPad上却不能。 就像窗口在那里但不可见...
func userDidTapShare()
{
print("Share")
let mediaURL = URL(fileURLWithPath: Constants.Path.mainFolder.stringByAppendingPathComponent(path:mediaPath))
let activityItems: [Any] = [mediaURL, "Check this out!"]
let activityVC = UIActivityViewController(activityItems: activityItems, applicationActivities: nil)
activityVC.popoverPresentationController?.sourceView = self.view
activityVC.popoverPresentationController?.sourceRect = view.frame
self.present(activityVC, animated: true, completion: nil)
}
iPad上没有该窗口。
任何想法?
您的sourceRect
是一个问题。 由于它占据了整个屏幕(因为您使用了视图框架),因此实际上会在屏幕框架的外部显示弹出框。
例如,如果您希望它显示在左上角之外:
activityVC.popoverPresentationController?.sourceRect = CGRect(x: 0, y: 0, width: 1, height: 1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.