8. Shape Magic

Shaping views goes beyond the simple cropping and mask layers you’ve read about so far. Nonrectangular views enable your apps to expand possibilities with fun and clever effects. For example, you might draw attention to a view by animating a halo behind it. Or you might use shapes to better stack buttons together for visual seamlessness. This chapter covers many advanced shape techniques you can use to add this pizzazz to your user interfaces.

How to Shape a View

A round view clips its presentation into a circular shape. Contrast the two screen shots in Figure 8-1. View clipping differentiates these otherwise identical layouts. Removing corners changes the way the onscreen elements pack together, enhancing whitespace while retaining ...

Get The Gourmet iOS Developer’s Cookbook: Even More Recipes for Better iOS App Development 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.