【发布时间】:2011-04-23 03:03:23
【问题描述】:
制作这些按钮的最佳方法是什么?我对右/左按钮没有问题,但是这个“标签”功能让我望而却步。
我正在考虑在 viewDidLoad 上添加自定义按钮,例如:
UIButton *profileBtn = [[UIButton alloc] initWithFrame:CGRectMake(50, 5, 100, 30)];
[profileBtn setTitle:@"Profile" forState:UIControlStateNormal];
[self.navigationController.navigationBar addSubview:profileBtn];
但是,这些按钮会一直停留在导航栏上,直到我手动将它们关闭。当然有更好/更简单的方法来做这样的事情吗? (请注意,我已经在使用屏幕底部的 UITabBarController)
【问题讨论】:
标签: objective-c uinavigationcontroller tabs uinavigationbar