Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 13, 2008, 01:51 PM   #1
DC Studios
macrumors newbie
 
Join Date: Jul 2008
Tab Bar Button Image

Is there a library with images that can be used on a tab bar button? Right now I'm using the FamFamFam silk icon set, but I want my images to be the same ones used in the iPhone OS so the design will stay consistent.

Thanks.

Last edited by DC Studios; Jul 13, 2008 at 01:58 PM.
DC Studios is offline   0 Reply With Quote
Old Jul 22, 2008, 03:28 PM   #2
mackwan
macrumors newbie
 
Join Date: Jul 2008
How do you change tab bar item image

Hi,
It looks like you have been able to change the tab bar item image? How do you do that? I have been struggling hours with the interface builder to change it and have tried gif, jpg, png, bmp images, but they all show up as grey boxes.

-kwan
mackwan is offline   0 Reply With Quote
Old Jul 22, 2008, 03:34 PM   #3
Jeremy1026
macrumors 68000
 
Join Date: Nov 2007
Quote:
Originally Posted by DC Studios View Post
Is there a library with images that can be used on a tab bar button? Right now I'm using the FamFamFam silk icon set, but I want my images to be the same ones used in the iPhone OS so the design will stay consistent.

Thanks.
Take some screenshots and then crop out the tab bar images you want to use? Might be the only way to do it.
__________________
1026 Development
Jeremy1026 is offline   0 Reply With Quote
Old Jul 23, 2008, 10:02 AM   #4
grimjim
macrumors member
 
Join Date: May 2003
The images used in UIBarButtonItems cannot be just normal coloured images. You need to create a 20 x 20 pixel PNG, with an alpha channel that will define the image. If your image is opaque, it will display as a square box.
grimjim is offline   0 Reply With Quote
Old Jul 23, 2008, 11:08 AM   #5
louden
macrumors 6502a
 
louden's Avatar
 
Join Date: Dec 2003
Location: Seattle
Quote:
Originally Posted by grimjim View Post
The images used in UIBarButtonItems cannot be just normal coloured images. You need to create a 20 x 20 pixel PNG, with an alpha channel that will define the image. If your image is opaque, it will display as a square box.
What's the best tool for drawing these? Illustrator? Photoshop?
__________________

8 Core 2.8 GHz Mac Pro
Core i7 11" MBA Ultimate
louden is offline   0 Reply With Quote
Old Jul 23, 2008, 11:58 AM   #6
grimjim
macrumors member
 
Join Date: May 2003
I use Photoshop, but I suppose that any app that can add an alpha channel to an image would do. I expect that there are cheaper options available than Photoshop; I just use it because I have it.
grimjim is offline   0 Reply With Quote
Old Jul 23, 2008, 02:20 PM   #7
mackwan
macrumors newbie
 
Join Date: Jul 2008
how to on photoshop

When I try to save as png it does not allow me to save with alpha channel.
Could someone give me some specific instructions on how I can go about saving a png with alpha channel, if I start with png just with rgb channels?

Thank you!
mackwan is offline   0 Reply With Quote
Old Jul 23, 2008, 03:21 PM   #8
grimjim
macrumors member
 
Join Date: May 2003
I don't think you can add an alpha channel to an RGB PNG in Photoshop.
The easiest way is simply to make a 20 x 20 pixel greyscale image with a transparent background, and draw your design on it. Then save it as a PNG, and the transparent areas will still be transparent. Then you can import it into your XCode project and assign it to a button, and it should work how you expect.

Of course, the major limitation here is that you cannot have coloured button icons.
grimjim is offline   0 Reply With Quote
Old Jul 28, 2008, 03:47 PM   #9
louden
macrumors 6502a
 
louden's Avatar
 
Join Date: Dec 2003
Location: Seattle
Quote:
Originally Posted by grimjim View Post
I don't think you can add an alpha channel to an RGB PNG in Photoshop.
The easiest way is simply to make a 20 x 20 pixel greyscale image with a transparent background, and draw your design on it. Then save it as a PNG, and the transparent areas will still be transparent. Then you can import it into your XCode project and assign it to a button, and it should work how you expect.

Of course, the major limitation here is that you cannot have coloured button icons.
Do you use gradients on your grey (gray) scale images? Does the iPhone OS automatically do that? I ask because I looked at the images from "The Elements" sample - and those images look like there's a gradient in them, but when you run the sample, it looks like the grey scale is removed.

That's a bit confusing...
__________________

8 Core 2.8 GHz Mac Pro
Core i7 11" MBA Ultimate
louden is offline   0 Reply With Quote
Old Jul 29, 2008, 03:10 AM   #10
grimjim
macrumors member
 
Join Date: May 2003
You're right - the images do have a gradient applied over them. I think that this is so that they will appear to be a constant grey tone when in use.

You need to remember that the iPhone uses the alpha values of each pixel (how transparent it is), rather than its colour. So if a pixel is black (ie fully opaque) on the image, it will appear white (fully opaque) on the tab bar. But if it is say, 20% grey in the image, that means that it is only 80% opaque. So some of the background will show through on the iPhone. But the tab bar background isn't a flat colour - it's a gradient. Which means that, if you have elements at the top and bottom of the image that have the same alpha value, they will look different when it is displayed on the iPhone. So Apple's designers have basically applied the same gradient as is on the tab bar, but in reverse, so that the grey levels of the icons look the same at the top and bottom of the image.

I hope that makes sense.
grimjim is offline   0 Reply With Quote
Old Jul 29, 2008, 06:33 PM   #11
louden
macrumors 6502a
 
louden's Avatar
 
Join Date: Dec 2003
Location: Seattle
Quote:
Originally Posted by grimjim View Post
You're right - the images do have a gradient applied over them. I think that this is so that they will appear to be a constant grey tone when in use.

You need to remember that the iPhone uses the alpha values of each pixel (how transparent it is), rather than its colour. So if a pixel is black (ie fully opaque) on the image, it will appear white (fully opaque) on the tab bar. But if it is say, 20% grey in the image, that means that it is only 80% opaque. So some of the background will show through on the iPhone. But the tab bar background isn't a flat colour - it's a gradient. Which means that, if you have elements at the top and bottom of the image that have the same alpha value, they will look different when it is displayed on the iPhone. So Apple's designers have basically applied the same gradient as is on the tab bar, but in reverse, so that the grey levels of the icons look the same at the top and bottom of the image.

I hope that makes sense.

I don't know - (and I do want to know what they're doing) - some buttons in that sample app have gradients, and some don't - yet they all show with gradients when highlighted and don't when not highlighted.

It looks to me like they ignore the color and gradient completely, they're just using the non-transparent part of the png file.
__________________

8 Core 2.8 GHz Mac Pro
Core i7 11" MBA Ultimate
louden is offline   0 Reply With Quote
Old Aug 10, 2008, 02:22 AM   #12
Elite Aaron
macrumors member
 
Join Date: Jan 2008
Location: Oklahoma
Hey,

How can I use a custom title with the provided tab bar icons?
__________________
17" iMac 2.0GHZ Core 2 Duo (10.5) :: 8 GB 2G iPhone :: 60 GB PS3
Elite Aaron is offline   0 Reply With Quote
Old Aug 16, 2008, 07:50 PM   #13
Elite Aaron
macrumors member
 
Join Date: Jan 2008
Location: Oklahoma
^^bump^^
__________________
17" iMac 2.0GHZ Core 2 Duo (10.5) :: 8 GB 2G iPhone :: 60 GB PS3
Elite Aaron is offline   0 Reply With Quote
Old Aug 16, 2008, 09:00 PM   #14
TripleJ
macrumors regular
 
Join Date: Jul 2008
Quote:
Originally Posted by Elite Aaron View Post
^^bump^^
AFAIK you can't. When you select a premade icon it'll revert the text back because it's a preset. If you really want to, I suppose you could just 'printscreen' the image and create a new one with the same symbol, then apply it as a custom tab bar image. That would let you change the title
TripleJ is offline   0 Reply With Quote
Old Dec 3, 2008, 06:31 PM   #15
jaminunit
macrumors newbie
 
Join Date: Dec 2008
Hi Every one,

Ok I have a few questions about these icons.
I'm a graphic designer and I don't want to keep sending files to the programmer to compile for me to look at only for them to look totally ****. I have sent so many already :/ I just cant get it right.

How do I make a nice looking circle if I can only use solid pixles,
every thing looks Jaged, (not like the head in the facebook app)

If I make a circle in illustrator then past that into photoshop on a 32X32 RGB file
then the circle comes through with a heap of nice anti aliasing so that the cirle looks smooth.

I have a transparent background layer.(photoshop checkerboard)

I save as 8bit 16 color PNG

but then the iphone compiler turns all the anti Aliasing into solid which looks nasty.

What would happen if I created a a solid black png then did a nice anti aliased Alpha Channel and saved it as a 24 bit PNG?
is that how they made this one above the world label?


Would that work?

If not then how do you create nice smooth icons?

thanks so much every one
J
jaminunit is offline   0 Reply With Quote
Old Dec 4, 2008, 04:51 AM   #16
jnic
macrumors 6502a
 
Join Date: Oct 2008
Location: Cambridge
Quote:
What would happen if I created a a solid black png then did a nice anti aliased Alpha Channel and saved it as a 24 bit PNG?
is that how they made this one above the world label?
Yes. Anything opaque will be light gray, pure alpha will be black, and semi-transparency is in between. Icons should be 32x32px.
jnic is offline   0 Reply With Quote
Old Dec 4, 2008, 12:40 PM   #17
beachdog
macrumors member
 
Join Date: Aug 2008
Quote:
Originally Posted by louden View Post
What's the best tool for drawing these? Illustrator? Photoshop?
I use Gimp, which is free and actually quite powerful.
beachdog is offline   0 Reply With Quote
Old Dec 4, 2008, 04:19 PM   #18
jaminunit
macrumors newbie
 
Join Date: Dec 2008
great thanks yall!
J
jaminunit is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Tab Bar without Tab Bar Controller? Buckeyes1995 iPhone/iPad Programming 8 Mar 31, 2011 10:17 AM
disable tab button in tab bar controller arnieterm iPhone/iPad Programming 1 Dec 12, 2008 04:30 AM
Hide the tab bar for certain tabs on UITabBarController dbredesen iPhone/iPad Programming 1 Aug 17, 2008 06:41 PM
tab bar for action buttons instead of mode? beachdog iPhone/iPad Programming 2 Aug 12, 2008 03:30 PM
Ollie's Tab - add a convenient "new tab" button to safari... MacBytes New Mac Application Announcements 3 Sep 15, 2003 04:48 PM


All times are GMT -5. The time now is 06:06 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC