I have a tabbed application project I am working on in Xcode written in Swift (Xcode 6.3 and Swift 1.2
). I am having a lot of trouble with custom Tab Bar icons. I have designed an image in Photoshop (CS6), saved it as a PNG, resized it in Prepo to be 30x30
and imported it into Xcode in the asset library. I then set the tab view controllers
icon to that image. However, it doesn't show up.
I have looked at these pages but not found any help:
https://www.youtube.com/watch?v=4qqqoAWNfZA
Custom tab bar icon colors
http://www.raywenderlich.com/forums/viewtopic.php?f=2&t=19333
http://www.appcoda.com/ios-programming-how-to-customize-tab-bar-background-appearance/
https://www.youtube.com/watch?v=4Tj_SeApUrs
What is the proper process to create custom tab bar icons?
After a bit of research I resolved the issue, so thought I'd post here in case anyone else has a similar issue. In Photoshop I did the following:
75x75 pixels
(and named [email protected]
), 50x50 pixels
(and named [email protected]
), and 25x25 pixels
(and named imageName.png
)In Xcode I did the following:
icoImageName
.icoImageName
. Note that I did not set the 'Selected Image' under the 'Tab Bar Item' (leave this blank).Done.
I hope this helps someone. Thanks to everyone for their help as well.