2013-07-04 69 views
0

基本上我有對setViewController沒有任何影響:animiated:?

ViewControllerA *aVC = [[ViewControllerA alloc] init]; 

ViewControllerB *bVC = [[ViewControllerB alloc] init]; 

UITabBarController *tabBarVC = [[UITabBarController alloc] init]; 

[tabBarVC setViewControllers:[[NSArray alloc] initWithObjects:aVC, bVC, nil] animated:YES]; 

現在我可以看到在tabBarController兩個選項卡,但是當我從一個選項卡切換到另一個,也看不出有任何影響,既不在模擬器或真實的設備。從文檔中我應該可以看到淡化的權利?我錯過了什麼嗎?

+1

衰落的是什麼? –

+0

不應該有任何褪色。從一個標籤切換到另一個標籤默認沒有動畫。 – JustAnotherCoder

回答

0

如果您將YES傳遞給setViewControllers:animated:,UITabBarController將動畫化在選項卡欄中插入新的選項卡欄項目。如果用戶從一個選項卡切換到另一個選項卡,則不會爲視圖控制器之間的轉換創建動畫。

相關問題