Search code examples
iosobjective-corientationadsadcolony

iOS app AdColony framework bad video orientation


our iOS app is running in portrait mode only without a problem. I have set the following in the info.plist.xml

    <key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>

I now added AdColony framework to the project. Everything works good except when I rotate the device from portrait to landscape mode while watching the video: the video rotates. That's ok, but after the video has finished and it returns back to the app, it's broken (see screenshots). Somehow it's stuck in landscape mode. Can someone help me how can I fix it?

http://s9.postimg.org/dog11jywf/IMG_0040.png http://s9.postimg.org/xkc0h3fxr/IMG_0041.png


Solution

  • The problem was the AlertView lib. I use DLAVAlertView, when the video stopped an alert appears which detect the orientation changes, and messed up the layout. So I disable the orientation changes for the alert.