Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Glossy Buttons in iOS

DZone's Guide to

Glossy Buttons in iOS

· Mobile Zone
Free Resource

Launching an app doesn’t need to be daunting. Whether you’re just getting started or need a refresher on mobile app testing best practices, this guide is your resource! Brought to you in partnership with Perfecto

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.

Keep up with the latest DevTest Jargon with the latest Mobile DevTest Dictionary. Brought to you in partnership with Perfecto.

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 DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

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

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}