此代码如何在我的UIView上不生成UINavigationBar?以编程方式创建UINavigationBar
//create the view
UIView *view = [[UIView alloc] init];
view.backgroundColor = [UIColor whiteColor];
//everything for tabbar
UINavigationBar *navBar = [[UINavigationBar alloc] init];
//add the components to the view
[view addSubview: navBar];
//show the view
self.view = view;
我看到白色的视图,但没有NavBar。任何帮助?我究竟做错了什么?
'view.frame = CGRectMake(x,y,w,h); navBar.frame = view.bounds;' – 2013-06-05 19:36:22