Hello I have been trying to write One code for all the orientations by calculating the heights and widths of different components with percentage. I get 320 by 460 frame when in portrait which is ok but the problem arises when i change to landscape mode even now i get the same dimensions but infact i should be getting 460 by 320.
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
NSLog(@"%f-%f",self.view.frame.size.width,self.view.frame.size.height);
}
I have also tried the other function but still no success
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
NSLog(@"%f-%f",self.view.frame.size.width,self.view.frame.size.height);
}