2009-09-17 97 views
0

我有一个UIButton。我在上面放了一张图片。当我点击那张图片时,我会看到一个视图。 在该图中,有一个UIButtonUIImageview。如何将这个视图从纵向移动到横向模式?iPhone:纵向模式问题?

回答

0

我假设你弹出一个新的视图。如果您的新视图具有自己的UIViewController,则可以指定它为shouldAutorotateToInterfaceOrientation:以取这些值中的任何一个:

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