Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the UItabbar icon image?

I am working on an app and want to customize the UItabbar icon image.

I have an image with name about.png this image i want to set as left icon image of my app's UItabbar. how can i do this?

like image 969
Faheem Rajput Avatar asked Sep 17 '25 13:09

Faheem Rajput


1 Answers

k you use this code and used your own images not the built in one's used your images...

- (id)init {
UIImage* anImage = [UIImage imageNamed:@"newspaper.png"];
UITabBarItem* theItem = [[UITabBarItem alloc] initWithTitle:@"News" image:anImage tag:0];
self.tabBarItem = theItem;
[theItem release];
return self;  }

newspaper.png is my own image in the tab bar...

k fine now this will be sufficient for your problem...

like image 106
user755278 Avatar answered Sep 20 '25 05:09

user755278