2014-02-25 30 views
1

我想調用「beginCustomizingItems」方法爲用戶提供tabbaritem管理,就像iOS 7 Music應用一樣。 所以我讀的文件,它說:如何訪問tabbarcontroller中的tabbar?

你不應該試圖操縱該屬性中存儲的UITabBar對象本身 。如果您嘗試這樣做,標籤欄視圖 會引發異常。要爲您的選項卡 界面配置項目,您應該將一個或多個自定義視圖控制器分配給viewControllers屬性。標籤欄收集從指定的視圖控制器 所需選項卡欄項**

由該屬性提供的選項卡欄視圖僅用於在要使用showFromTabBar以顯示一個動作片的情況:方法的UIActionSheet類。 不過,我在我的項目中試過了:

[self.tabBar beginCustomizingItems:self.tabBar.items]; 

它崩潰了。但我認爲必須有一些方法來訪問tabbarcontroller中的tabbar。

iOS7 Music App tabbar management 任何人都可以幫助我嗎?

+0

爲什麼你需要調用beginCustomizingItems:? – Rajesh

回答

0
@property(nonatomic,copy) NSArray *customizableViewControllers; 
// If non-nil, then the "More" view will include an "Edit" button that displays customization UI for the specified controllers. By default, all view controllers are customizable. 

最後我覺得這是幫我一下吧。

相關問題