iOS UIButton

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


UIButton : UIControl intercepts touch events and sends an action message to a target object when it's tapped. You can set the title, image, and other appearance properties of a button. In addition, you can specify a different appearance for each button state.


Button Types

A button’s type defines its basic appearance and behavior. After creating a button, you cannot change its type. The most commonly used button types are the Custom and System types, but use the other types when appropriate

  • UIButtonTypeCustom

    No button style.
  • UIButtonTypeSystem

    A system style button, such as those shown in navigation bars and toolbars.
  • UIButtonTypeDetailDisclosure

    A detail disclosure button.
  • UIButtonTypeInfoLight

    An information button that has a light background.
  • UIButtonTypeInfoDark

    An information button that has a dark background.
  • UIButtonTypeContactAdd

    A contact add button.

When creating a custom button—that is a button with the type custom—the frame of the button is set to (0, 0, 0, 0) initially. Before adding the button to your interface, you should update the frame to a more appropriate value.

Got any iOS Question?