Inserting iPhone Tab Bar Icons Using XCode

Firstly you will need to add the icons to your project. Right click the resources folder under the main project icons and select Add > Existing Files…

(This is article from http://www.glyfx.com/guide_iphone.html)


Select Resources

Add Icons To Project

In Xcode find the folder labeled “NIB Files” and expand it to see it’s contents. Double click on the .xib file that contains the tab bar you want to add the icons to.

NIB Files

This will launch interface builder and you should now see a the visual layout window of the NIB file.

Visual Layout Window

If the inspector isn’t already visiable, open it by going to the tools menu and selecting “inspector”.

Select the tab item that you want to add an icon to in the tab bar. If you need to add extra tab bar items you can do so by dragging them in from the library. You may need to click a couple of times to drill down to the selection you need. You’ll know you’ve got it when you see that only the icon and text is selected rather than the entire tab item.

Tab Item Selection

In the inspector pallette make sure that the attributes inspector is showing. in the bar item section, select the icon you want displayed for this tab bar item in the menu next to “Image”.

Attributes Inspector

You can also add icons by dragging them from a finder window onto the tab item.

If you want to see the icons in action you will need to go back to xcode and click the Build and Go button on the main toolbar. If you select “simulate Interface” from the file menu in Interface Builder the icons won’t always show up in the application.

 

Original Article: http://www.glyfx.com/guide_iphone.html

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.