Over a million developers have joined DZone.

Glossy Buttons in iOS

· Mobile Zone

So it’s been a while since our last shiny buttons post — and why yes, yes it’s time for an update; here’s a piece of code that looks like our new goto library for the shiny thing:

iPhone Glossy Buttons

The two points I was after was the “rounded” gloss on the top, and the neat highlights at the top and bottom to give the button the appearence of being inset in in the surface and rising above it.

So I looked everywhere on the net for code for such a button, without success … Anyway, I had to come out with my own code, and this meant understanding how Core Graphics does clipping – not a small thing!


rounded_button_2.png rounded_button_1.png

Now that’s some nicely done shininess, indeed. Definitely looks like we’ll be adopting that.

Topics:

Published at DZone with permission of Alex Curylo, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}