Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to imitate a red gloss delete button in iphone/ipad contact?

I want to have a green "OK" button and a red "Cancel" button in my app. The red one would look like:

enter image description here

I wonder if this can be done programmatically instead of taking screenshot -> photoshop crops -> set as a custom button in IB

Thanks! Leo

like image 414
leo Avatar asked May 23 '11 17:05

leo


2 Answers

I like Jeff LaMarche's Gradient Buttons library for this sort of thing.

like image 131
Dan Ray Avatar answered Oct 04 '22 22:10

Dan Ray


A little Googling would have thrown up this:

http://www.cimgf.com/2010/01/28/fun-with-uibuttons-and-core-animation-layers/

like image 31
Abizern Avatar answered Oct 04 '22 22:10

Abizern