user1163722
user1163722

Reputation:

Question on iPhone Development Custom UI

So on the App Store, what I'm seeing a lot is a custom UI that still looks like the native Apple ones, but is some how "spruced up" in look. How exactly would I create something like that, as in say a button that is a hexagon or something instead of a rounded rectangle?

Thanks,

VectorWare

Upvotes: 1

Views: 215

Answers (2)

Olie
Olie

Reputation: 24675

  • Draw any image you want, using your favorite art program.
  • Don't forget to make pressed and "up" states.
  • Create your button (in IB or code.)
  • Make the button of type UIButtonTypeCustom (IB or code.)
  • In IB, set the button's image to your image.
  • Set the image separately for NORMAL and HIGHLIGHTED states (IB or code.)

Example in code:

[myButton setImage: myImage forState: UIControlStateNormal];

Upvotes: 1

chown
chown

Reputation: 52778

They are probably either subclass' of UIView/UIWhatever or images with a transparent UIButton over top of the image. Is there something specific you want to implement?

Some examples: Subclassing a UIView

UIView subclass dialog window

Upvotes: 0

Related Questions