Like a title, i have a view build with IB. When the app are lunched all work fine, but when i select a tab bar i开发者_JAVA百科tem the title disappear!
Any idea?
sory for my bad english, i'm italian :D
UPDATE: the title of the tabBarItem is taked by the viewController title, in this case
self.title = @""
i have to make hidden the viewcontroller title
This simple line will also do the job :
self.navigationItem.title = @"";
Cheers.
self.title = @"MY TITLE";
CGRect frame = CGRectMake(0, 0, 400, 44);
UILabel *label = [[[UILabel alloc] initWithFrame:frame] autorelease];
label.backgroundColor = [UIColor clearColor];
label.textColor = [UIColor clearColor];
label.text = @"NO TEXT";
self.navigationItem.titleView = label;
(I tried self.navigationItem.titleView = nil
or self.navigationItem.titleView.hidden = YES
but without results.)
精彩评论