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

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

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.

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:

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

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}