iPhone status bar orientation with opengl

Posted by sfider on Stack Overflow See other posts from Stack Overflow or by sfider
Published on 2010-04-11T22:16:17Z Indexed on 2010/04/11 22:23 UTC
Read the original article Hit count: 320

Filed under:
|
|
|

I have opengl only view that displays in portrait and landscape mode using projection matrix (view's transformation is identity all the time). I need to show status bar with proper orientation. I do this by setting status bar orientation property in UIApplication and changing frame of opengl view so the view won't go under status bar.

When I change from landscape to portrait (landscape is the initial state) view's frame is set to (0, 20, 320, 460) and stays like this. However view appears to be translated by (-10, -10).

It seems that I did change the size of view but couldn't move it. Weird things are:

  • initialy view is full screen, I change it to (0, 0, 300, 480) (landscape with status bar) and it works then, it doesn't work when I try to chenge it for the second time (portrait with status bar)

  • frame property of the view shows that view is placed correctly

Any thoughts on what can by the problem?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about opengl