I defined a UITabBarprogrammatically, but how can I set a custom icon UITabBarwhen an element is active?
Here is my code for declaring a button UITabBar, but how can I customize a custom image when it is active?
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.title = NSLocalizedString(@"Free", @"Free");
self.tabBarItem.image = [UIImage imageNamed:@"Free.png"];
}
return self;
}
Jones source
share