Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Sergio Barrera
4,198 PointsIssue with tab bar images
Hi, I am setting up a Tab Bar Controller with 4 tabs and have created 4 image icons with pixelmator (just a regular squared image filled with blue color for now...)to be set as the tab bar image for each item. For some reason I can't make them look good! The icon shows up either bigger or cuttoff at the tab bar location.
I tried the recommended (Apple hig) sizes: 30 px and 60 px but I keep getting the same result. Changed resolution, same results.
Any ideas about tab bar icon design or how it must be to have a good look? Thank you!
2 Answers
Amit Bijlani
Treehouse Guest TeacherLet's say your image is named icon.png which should be sized 30 x 30px and then create a high res version named icon@2x.png sized 60 x 60px.
Sergio Barrera
4,198 PointsYes, i did that and it shows up just half of the icon at running time. I called it myimage.png(30x30) and myimage@2x.png(60x60) with a high res of 150px. I restarted xcode few times, cleaned up several times and got same results.
By the way I did have some issues with the lastest xcode version 4.6.1 when assigning custom classes to my TVCs, but after the restart I was able to fix it.
If you see the default image that comes with the tabbar controller, called first.png and first@2x.png, it's just a black square & circle. I will try again. Thanks Amit for your reply.