Stop rotation animation from playing on iPhone

When i rotate my iPhone when im in my Unity iPhone game it plays the screen rotate animation, showing the black frame rotation on the screen. I am not planning on using screen-rotation in my game, so how can i stop this from happening?

https://devforums.apple.com/message/220034

You'll need to log in to the apple developer portal to view that link.

Check out the native code example on the unity resources and add this line of xcode to your project.

Posted here for convenience... add this to your root view controller and your other view controllers:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

Alternatively you can check this answer:

http://answers.unity3d.com/questions/14655/unity-iphone-black-rect-when-i-turn-the-iphone