私はアプリケーションを実装しています。ここでは、モーダルビューを表示するナビゲーションアイテムボタンが表示されます。このモーダルビューには、ログインフォームが表示されます。ログインが正しい場合は、2つまたは3つのコントローラを持つタブバーを表示する別のビューに移動したいと思います。ログインフォームの後にタブバーを表示するiPhoneアプリケーション
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
return YES; }
をしてから、私のRooViewControllerに私が持っている:: はこれまでのところ、私AppDelegateに私が持っている
- (void)viewDidLoad {
HomeViewController *homeController = [[HomeViewController alloc] initWithNibName:@"HomeViewController" bundle:nil];
self.controladorVistaHome = homeController;
[self.view addSubview:homeController.view];
[homeController release];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Login" style: UIBarButtonItemStyleBordered target:self action:@selector(showModalLoginForm)];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Register" style: UIBarButtonItemStyleBordered target:self action:@selector(showModalRegisterForm)];
[super viewDidLoad]; }
私は、ログインボタンをクリックすると、それはモーダル私を示していフォームを表示します。ユーザーがログインすると、いくつかのコントローラでナブバーの表示をしたいと思います。 私が自分のAppDelegateを変更した場合、私がこれまでに得たことはうまくいかないでしょう。この仕事をする方法はありますか? ありがとうございます!
初回起動時にどの部分をモーダルビューに表示する必要がありますか?私のAppDelegateでは?私はAppDelegateを変更することによって混乱していると感じています。 – Ruben
AppDelegateでこれらの検証(ログインしたユーザー、ログアウトしたユーザーなど)をすべて作成する必要がありますか? – Ruben
AppDelegateの変更を怖がってはいけませんが、私は、Modal Viewの表示/非表示を処理するUITabBarControllerサブクラスを作成します。 –