我正在開發一個iPhone應用程序。 UIViewController
中是否有任何默認狀態/訪問器,用於告知方向是否正在進行?UIViewController:識別方向正在進行
目前我做了以下:
一個BOOL
成員的UIViewController
子說isOrientationChangeInProgress
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
isOrientationChangeInProgress = YES;
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
isOrientationChangeInProgress = NO;
}
有沒有什麼更好的辦法?
爲什麼需要這個? – jtbandes