문제

I have a UITabBar and a UINavigationBar created in IB, when I launch my application everytime I navigate the UINavigation title change because I'm using

self.title = @"NAME"; 

my problem is that the UITabBarItem will change with the same name at the same time. I want to put a static name only for the UITabBarItem, how to do it in IB or programatically maybe.

Thanks,

도움이 되었습니까?

해결책 2

I find the solution in this adress Stackoverflow navigationItem Title Sorry I didn't find it before posting my question.

다른 팁

try returning an explicit tabBarItem for your controller, and set its title yourself.

- (UITabBarItem *) tabBarItem {
    return [[[UITabBarItem alloc] initWithTitle: ...

try this, in your viewDidLoad

self.tabBarController.navigationItem.title = @"title";
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top