Jumat, 21 Mei 2010

Gradient Buttons Yet Again

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 komentar:

Posting Komentar

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga, Salman Khan