iPhone:纵向模式问题?
问题描述:
我有一个UIButton
。我在上面放了一张图片。当我点击那张图片时,我会看到一个视图。 在该图中,有一个UIButton
和UIImageview
。如何将这个视图从纵向移动到横向模式?iPhone:纵向模式问题?
答
我假设你弹出一个新的视图。如果您的新视图具有自己的UIViewController,则可以指定它为shouldAutorotateToInterfaceOrientation:
以取这些值中的任何一个:
typedef enum {
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
} UIInterfaceOrientation;