2009-08-01 4 views

答えて

0

[編集]ボタンを使用すると、メインページのタブにあるボタンを並べ替えることができます。ユーザーが並べ替えるのを防ぎたいですか?

あなたは並び替えないようにしたいん場合は、実行する事は、このようなものです:

tabBar.customizableViewControllers = nilを;

この手順を実行しない場合、APIはすべてのviewControllerがカスタマイズ可能であるとみなし、すべてが再配置可能です。

編集ボタンを気にせずに、一部のビューを再配置可能にしたい場合は、viewControllersの完全なセットの一部を含むtabBar.customizableViewControllerに配列を割り当てます。

0

Appdelegate.h

アプリのdelegate.mに

Appdelegate.m

を含めるには、これらの行を追加します追加します。

この行はアプリケーションに含まれていますdidfinishlaunchingoptions関数;

(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  

    tabBarController.moreNavigationController.delegate = self; 
} 

appdelegate.mに機能下回っ

(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { 
    UINavigationBar *morenavbar = navigationController.navigationBar; 
    UINavigationItem *morenavitem = morenavbar.topItem; 
    /* We don't need Edit button in More screen. */ 
    morenavitem.rightBarButtonItem = nil; 
} 

thatsのすべてを追加し、それが今で動作します。

appdelegate.hの
+0

には、

関連する問題