Buttons

UIButton instances provide simple buttons. Users can tap them to trigger a callback via target-action programming. You specify how the button looks, what art it uses, and what text it displays.

iOS offers two ways to build buttons. You can use a typed button, selected from several predesigned styles, or build a custom button from scratch. The current iOS SDK offers very limited precooked types. In iOS 7, the entire UI has been redesigned with a flat, minimalistic design. One of the most noteworthy results of this redesign is the deprecation of the timeworn rounded rectangle. The upshot is the addition of a very new style of button, one that is plain (but bolded) text—the UIButtonTypeSystem type. In addition, many of the remaining button ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.