orientation - iphone - handling view rotations -


I am making a small UIView 320 pixel width and 120 pixels height of size. I am using the following code to add the view to see the maximum window.

  baseview.frame = CGRectMake (0,220,320,120); UIWindow * window = [[UIApplication shared application] Keyword]; [Add windowSubview: BASView]; [Window louzubutrofront: besview];  

The above code is showing a view below the status bar and it is expected to have an orientation picture of the app, when it is working fine. But when the orientation of the app is reversed, I am adding another line of code to rotate the view and it

  [baseView set transforms: CGAffineTransformMakeRotation (-M_PI / 2)];  

But now, I'm looking at the bottom of the application (instead of looking at the top of the status bar) and the plane, except the situation, How should I control this situation to show the view under the status bar.

If you add these views to the main view in the window, the question as a subview, rotation And positioning will be taken care of for you.

If you want to add the view as the main view of the window, then I think that the center of the scene needs to be zoomed.


Comments