3
“像标签”的iOS导航栏会是什么使这些按钮的最好方法?我没有右/左按钮的问题,但这个“标签”功能正在逃避我。
我想加入对viewDidLoad中自定义按钮一样的:
UIButton *profileBtn = [[UIButton alloc] initWithFrame:CGRectMake(50, 5, 100, 30)];
[profileBtn setTitle:@"Profile" forState:UIControlStateNormal];
[self.navigationController.navigationBar addSubview:profileBtn];
然而,然后按钮停留在导航栏上,直到我手动得到他们。当然有更好/更简单的方法来做这样的事情? (请注意,我已经在屏幕底部使用了UITabBarController)
啊,谢谢!我的导航设置方式,让它工作起来有点痛苦,但我现在就开始了。 – Buchannon 2011-04-27 18:43:41