1

Hello I am making a sports app and I have three UITabBarItems in a tab bar: Featured, My Teams and Results. I like the default icons for each as the default featured, most viewed and history respectively.

What it looks like in the .xib:

However when I try to change the titles in the UIViewController they do not change.

UIViewController code (I do not need to change the title of featured):

[_teamsItem setTitle:@"Teams"];
[_resultsItem setTitle:@"Results"];

How can I change the titles, or how can I use the icons from those default UITabBarItems to create my own? Thanks in advance.

carloabelli
  • 4,289
  • 3
  • 43
  • 70
  • Why don't you change the title in IB? – Adrian P Aug 23 '13 at 02:49
  • @XCodeMonkey Xcode does not allow you to change the titles in IB without making it a custom icon. – carloabelli Aug 23 '13 at 02:51
  • There might be a reason for that though.. Maybe your app won't be accepted in AppStore if you use their icon without the text. I'm not sure, I'm just saying, maybe you should have a backup plan as well. – Sti Aug 23 '13 at 03:38

1 Answers1

5

If you use system icons, they come with the titles. You can't use just the icons (without titles), unless you use a tool like iOS Artwork Extractor to actually extract the images from iOS and add them to your project.

Scott Berrevoets
  • 16,921
  • 6
  • 59
  • 80
  • So I have to find or create custom icons. Such a pain because those icons are perfect. – carloabelli Aug 23 '13 at 02:51
  • The thing is, they probably aren't. Apple created them with a very specific purpose, so if they truly are "perfect" for you, then the title that comes with it must be perfect too. If not, they probably work, but they aren't perfect. There are exceptions, of course. – Scott Berrevoets Aug 23 '13 at 03:01
  • I see what you are saying, so I will correct myself by not saying "perfect", but "good enough that I should not have to go looking for other icons which I will have to credit in my app". – carloabelli Aug 23 '13 at 03:05
  • Also will the extracting the icon method get past Apples app review if Apple thinks its icons are only good for the titles they present by default? – carloabelli Aug 23 '13 at 03:08
  • Whatever I'll wait until iOS 7 and hope they change this. – carloabelli Aug 23 '13 at 03:27
  • 1
    @cabellicar123: No, if you just extract the image, you won't have a problem getting through app approval. I've done it several times, for the same reason you want to do it, and that seems to be just fine. – Scott Berrevoets Aug 23 '13 at 12:06