Answer the question
In order to leave comments, you need to log in
How to change icons dynamically in UITabBarController?
Good afternoon, I need to change the icons in the UITabBarController while in applications, without restarting.
Answer the question
In order to leave comments, you need to log in
UIImage * selectedImage = [UIImage imageNamed:@"icon_selected.png"];
UIImage * unselectedImage = [UIImage imageNamed:@"icon_unselected.png"];
UITabBarItem * item = ((UITabBarController*)([tabBarController.viewControllers objectAtIndex:index])).tabBarItem;
[item setImage:unselectedImage];
[item setSelectedImage:selectedImage];
won't fit?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question