1

我在橫向模式下的每個選項卡上都有一個帶有導航控制器的選項卡欄應用程序。它會在控制檯中提示警告在UITabBarController,UINavigationController和MapKit中使用兩級旋轉動畫警告

使用兩段旋轉動畫。爲了使用更平滑的單級動畫,這個 應用程序必須刪除兩階段方法實現。

現在我重寫此方法(來源:Single-Stage vs Two-Stage Animation for iPhone Apps?

- (void)willAnimateRotationToInterfaceOrientation: 
UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration 
{ 
[super willAnimateRotationToInterfaceOrientation:interfaceOrientation duration:duration]; 
} 

,並且如果做出的標籤欄控制器的第一選項卡中的警告被固定在所有選項卡,除了一個選項卡。 該選項卡包含MKMapView,ScrollView,一些標籤,按鈕和幾個UIImageViews。

上述功能在地圖控制器上也添加了(Overrided),但它仍然會產生兩級動畫警告。

我剛剛在一些頁面上看到,這也可能是由MapKit引起的,有沒有一些解決方法。

在此先感謝。

+0

這個問題沒有答案,任何人? – Sohail 2011-06-16 05:26:58

回答

0

如果系統是造成這個警告,您可以放心地忽略它,只是確保你正在使用

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration 
在你的代碼,而不是舊的(二階段)方法

到處

- (void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 

and

- (void)willAnimateSecondHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration 
相關問題