我使用UINavigationController的id来使用导航栏的一个典型情况。设置其界限和框架似乎不会有所作为,即时通讯使用此代码我如何设置UINavigationBar在iphone应用程序中的高度
//set up the navigation
UINavigationController *navigationController = [UINavigationController new];
[navigationController.navigationBar setBarStyle:UIBarStyleBlack];
[navigationController.navigationBar setTintColor:[UIColor purpleColor]];
[navigationController.navigationBar setBounds:CGRectMake(0.0, 0.0, 480.0, 100.0)];
[navigationController.navigationBar setFrame:CGRectMake(0.0, 0.0, 480.0, 100.0)];
但无济于事。有任何想法吗?
你说得对,它不是继承,想着其他的事情而写的问题。至于'new',必须从某处复制代码 – 2009-09-07 01:16:36
新方法只是alloc/init的快捷方法。以完全相同的方式工作。 – horseshoe7 2011-08-01 10:11:19