sagarkothari
sagarkothari

Reputation: 24810

How to set UIButton type?

A small - little question.

I have seen many application having buttons like following. alt text

While using Interface builder I didn't Found any option to have this kind of button. How to have this kind of button in your application.

Upvotes: 0

Views: 4872

Answers (2)

Nava Carmon
Nava Carmon

Reputation: 4533

See UICatalog example -> Buttons. You will find there this kind of buttons. Usually they're done using png images for pressed & normal states. I think you can do it in IB by binding a png image to pressed & normal states, but the example in UICatalog is pretty clear and can be used "as is"

Upvotes: 1

groundhog
groundhog

Reputation: 4780

Almost invariably these styles are done using bitmap images or for the more thrifty of memory, CAGradientLayer.

To do it with CAGradientLayer, you would do something very much like the way the gradient and shadows are done in this blog entry.

Upvotes: 1

Related Questions