- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if ([[UIDevice currentDevice] orientation] == UIInterfaceOrientationIsPortrait(interfaceOrientation))
{
[self isPortraitSplash];
}
else if ([[UIDevice currentDevice] orientation] == UIInterfaceOrientationIsLandscape(interfaceOrientation))
{
[self isLandScapeSplash];
}
return YES;
}
在我的方法isPortraitSplash
和isLandScapeSplash
,我設置視圖的幀。問題與方向
當方向更改時,它始終呼叫isLandScapeSplash
- 無法調用isPortraitSplash
方法。
任何人都可以告訴我爲什麼會發生這種情況嗎?