tags:

views:

149

answers:

1

I have one UIButton. I put one image on that. When I click on that image, I get one view. In that view, there is one UIButton and UIImageview. How can I move this view from Portrait to Landscape mode?

A: 

I assume you pop up a new view. If your new view has its own UIViewController, you can specify that it shouldAutorotateToInterfaceOrientation: to whichever of these values you want:

typedef enum {
   UIInterfaceOrientationPortrait           = UIDeviceOrientationPortrait,
   UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
   UIInterfaceOrientationLandscapeLeft      = UIDeviceOrientationLandscapeRight,
   UIInterfaceOrientationLandscapeRight     = UIDeviceOrientationLandscapeLeft
} UIInterfaceOrientation;
Malaxeur