ios - ADColony 视频广告因方向改变导致应用程序崩溃

标签 ios swift adcolony

第一次播放 ADColony 广告时一切正常,但第二次播放广告时它没有占据整个屏幕,在我关闭广告后应用程序崩溃并显示日志:

由于未捕获的异常“UIApplicationInvalidInterfaceOrientation”而终止应用程序,原因:“支持的方向与应用程序没有共同的方向,并且 [ADCRotatingViewController shouldAutorotate] 正在返回 YES”

我的应用程序是用 swift 编码的,它返回 shouldAutorotate() 为 false,支持的方向是 UIInterfaceOrientation.Portrait.rawValue | UIInterfaceOrientation.LandscapeLeft.rawValue

override func shouldAutorotate() -> Bool {
        return false
    }

override func supportedInterfaceOrientations() -> Int {
        return UIInterfaceOrientation.Portrait.rawValue | UIInterfaceOrientation.LandscapeLeft.rawValue
    }

请帮我解决这个问题。

最佳答案

听起来您正在与我们的旧版 SDK 集成。请尝试在 http://github.com/adcolony 更新最新可用版本.如果这不能解决您的问题,请将支持票提交至 support@adcolony.com。

关于ios - ADColony 视频广告因方向改变导致应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28629842/

相关文章:

ios - 定义基于 BOOL 的常量

iphone - 如何在固定时自动显示地点标题?

swift - iWatch : WKInterfaceLabel is it possible to stop text from being cut off with "..." at the end of a label?

ios - 找不到广告网络适配器

ios - 在 iOS Swift 3 中将 openGL ES 绘图保存为 PNG 图像文件

html - Safari CSS 字体颜色问题

swift - URL 请求 "The operation couldn’ 中出现错误,无法完成。没有这样的文件或目录”

swift - 将数据从一个 View Controller 传递到另一个(图片)

ios - 在 Swift 中自定义 AdColony V4VC 弹出菜单

ios - Adcolony 委托(delegate)没有被调用