Friday, May 21, 2010

Gradient Buttons Yet Again

Posted by hiday81 at 1:36 PM
I added two more button styles to the iPhone Gradient Buttons project and made stroke color and stroke weight configurable options. The two new styles look exactly like the old Black and White style, only the highlight state is a blue gradient. These simulate the style used in alert sheets in several Apple applications.

Screen shot 2010-05-21 at 4.29.17 PM.png

Some of the Core Graphics code was machine-generated and is in kind of rough shape, but it works. I'm thinking about refactoring the different styles methods into something shorter, perhaps a plist, or just C arrays with the different numeric values.

For some strange reason, when I try to use arrayWithObjects: instead of creating a mutable array and manually adding the colors one at a time, I get a NULL gradient back. I have no idea why, but it's working this way at least.

Anyone who wants to contribute, let me know, I'd be happy to add committers.

0 comments:

Post a Comment

Related Post

 

Copyright © 2011 Next Iphone | Store Mobile Phone Store