views:

35

answers:

1

Hi Folks,

I have an iPad application which has portrait and landscape mode. The default behavior of the application is portrait.

I am capturing the orientation thru device orientation. I have a variable to catch the x,y,height and width of the application on rotation. But it prints the same value all the time. Same value on each rotation.

CGRect appFrame = [[self view]frame];

//2010-07-19 15:48:23.204 MultiView[6657:207]  app frame 0 , 0, 1024, 768 
//2010-07-19 15:48:28.115 MultiView[6657:207]  app frame 0 , 0, 1024, 768

Can anyone guide me please.

Regards.

A: 

use CGRect appFrame = [[self view] bounds];

valexa