Updating tabBarItem more than once (three20)
I'm trying to update the tabBarItem more than once, but I can't get it to work.
I've used theese methods:
self.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"New title" image:image开发者_开发问答 tag:0] autorelease];
and:
self.tabBarItem.title = @"New title";
self.tabBarItem.image = image;
And they work, but only once. So now I'm stuck.
Any help is appreciated.
Thanks
The documentation for both the title
and image
properties notes:
You should set this property before adding the item to a bar.
It is probably wise to heed this advice. If you want to change the properties, just create a new tab bar item with the new settings and assign it to self.tabBarItem
.
精彩评论