开发者

need help about how to add Menu page

i'm download DrillDownApp example project from iPhoneSDKArticles

i have a problem when i'm try to add menu page before load MainWindow.

i can't load [window addSubvie开发者_运维百科w:[navigationController view]]; on other class except on DrillDownAppAppDelegate.m

could you explane me or give me some tutorial how to add menu page on DrillDownApp please

i'm new to iphone development, need some advise please , thanks all


Im not entirely sure on what you want to achieve, but I think you want to add a view to something that is not the appDelegate that instantiates the navigationController.

To add view to the navigationController you use:

    MYViewController *viewController = [[MYViewCOntroller alloc]
                                            initWithNibName:@"MYViewController" bundle:nil];
[self.navigationController pushViewController:viewController animated:YES];
[viewController release];

If you just want to add a view to another view you should use:

    MYViewController *viewController = [[MYViewCOntroller alloc]
                                    initWithNibName:@"MYViewController" 
                                    bundle:nil];
[self.view addSubView:viewController.view]

Was this what you needed? :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜