开发者

Updating tabBarItem more than once (three20)

开发者 https://www.devze.com 2023-02-23 00:23 出处:网络
I\'m trying to update the tabBarItem more than once, but I can\'t get it to work. I\'ve used theese methods:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消