UIInterfaceOrientation方向枚舉:
UIInterfaceOrientationPortrait //home健在下
UIInterfaceOrientationPortraitUpsideDown //home健在上
UIInterfaceOrientationLandscapeLeft //home健在左
UIInterfaceOrientationLandscapeRight //home健在右
旋轉螢幕時觸發的函數://旋轉方向發生改變時-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {}//視圖旋轉動畫前一半發生之前自動調用-(void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {}//視圖旋轉動畫後一半發生之前自動調用-(void)willAnimateSecondHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration {}//視圖旋轉之前自動調用-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {}//視圖旋轉完成之後自動調用-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {}//視圖旋轉動畫前一半發生之後自動調用-(void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {}