Is there a way to create buttons similar to the glossy icon-buttons on the home screen on the iphone but in your own app? The only thing i've found to create image button is to create rounded rect-buttons and set the image or background property on it, but that does not automatically create the glossy surface and rounding.
views:
436answers:
2You'll need to use images. Apple doesn't make the glossy UIGlassButton
class public.
If you're after buttons the same size as on the home screen, on black background, you could just set the image as your Icon.png, install the app in the simulator, take a screenshot of the home screen with the generated glossy icon, cut the icon out, and repeat the whole process with the rest of your icons.
Maybe simpler, if you don't have Icon.png set in your app, you'll get the white button on the home screen. Take a screenshot of that, and use it in a layer in Photoshop or similar to lighten up the underlying layer with your icon.
If you need buttons with other sizes, have a look at this blog entry on Cocoa with Love. Those buttons don't look exactly like the ones on the home screen, but you might be happy with that look, or modify the code to your taste.