2009-09-17 85 views
0

我有一個UIButton。我在上面放了一張圖片。當我點擊那張圖片時,我會看到一個視圖。 在該圖中,有一個UIButtonUIImageview。如何將這個視圖從縱向移動到橫向模式?iPhone:縱向模式問題?

回答

0

我假設你彈出一個新的視圖。如果您的新視圖具有自己的UIViewController,則可以指定它爲shouldAutorotateToInterfaceOrientation:以取這些值中的任何一個:

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