iDevGames Forums
Help! Came Center is messing up my view! - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: Help! Came Center is messing up my view! (/thread-10037.html)



Help! Came Center is messing up my view! - Jamie W - May 7, 2012 05:48 AM

Hello,

My game is running in landscape mode; my main view controller for shouldAutorotateToInterfaceOrientation, returns YES for UIInterfaceOrientationLandscapeRight and UIInterfaceOrientationLandscapeLeft, NO for anything else.

Everything seems to work fine, until...

I show game a center leaderboard. The leaderboard comes on okay (in landscape mode), but after it gets dismissed, the orientation of my game somehow gets switched to portrait. I can tilt the device and the view rotates back in to landscape, and then will not go in to portrait again (unless I display the learderboard again).

A bit miffed!

Any help or suggestions would be appreciated..

Thanks,
Jamie.


RE: Help! Came Center is messing up my view! - Jamie W - May 7, 2012 10:45 AM

Solved it. I was only attaching the view (of the game center view controller) in to the view hierarchy. Turns out I needed to attach the view controller itself.