ページ 11

navigationControllerとTabBarController 同時使用

Posted: 2011年2月20日(日) 00:33
by べっきー
objective-c iphone SDK
navigationControllerとTabBarControllerを同時使用したいのですが、
以下のようにコントローラを2個定義するとビルドでおこられます。。
Classes/xxxAppDelegate.m:28: error: request for member 'view' in something not a structure or union

どのように実装すればいいのでしょうか。

コード:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
    // Override point for customization after application launch.  

    // Add the main view controller's view to the window and display.
    [self.window addSubview:rootController.view]; 
	[self.window addSubview:navController.view]; ★エラー★
    [self.window makeKeyAndVisible];

    return YES;
}

Re: navigationControllerとTabBarController 同時使用

Posted: 2011年2月20日(日) 16:04
by Justy
 UINavigationController.hは importしていますか?

Re: navigationControllerとTabBarController 同時使用

Posted: 2011年2月20日(日) 18:12
by べっきー
以下のページ参考にできました。
ありがとうございました。
http://ameblo.jp/xcc/entry-10386303624.html