iPhone:纵向模式问题?

时间:2009-09-17 14:42:28

标签: iphone

我有一个UIButton。我把一张图片放在那上面。当我点击该图像时,我得到一个视图。 在该视图中,有一个UIButtonUIImageview。如何将此视图从纵向模式移动到横向模式?

1 个答案:

答案 0 :(得分:0)

我假设您弹出一个新视图。如果您的新视图有自己的UIViewController,您可以指定shouldAutorotateToInterfaceOrientation:到您想要的任何一个值:

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