Showing posts with label How to rotate iphone simulator ?. Show all posts
Showing posts with label How to rotate iphone simulator ?. Show all posts

Wednesday, October 20, 2010

How to rotate iphone simulator ?

This code is used for rotating iPhone simulator with it's view.

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
    [UIApplication sharedApplication].statusBarHidden = TRUE;
    // Rotate the view for landscape playback
    [[self view] setBounds:CGRectMake(0, 0, 480, 320)];
    [[self view] setCenter:CGPointMake(160, 240)];
    [[self view] setTransform:CGAffineTransformMakeRotation(M_PI / 2)];