Chapter 11. User Interaction

In This Chapter

The Click of a Mouse

Hit Testing CALayer Objects

Hit Test

Example Application: Color Changer

LZButtonLayer

Interface Builder

Building the Layers

Watching the Mouse

Keyboard Events

Layer-Backed Views

What is the point of a graphical interface if a user cannot interact with it? However, a quick exploration of the Core Animation API reveals that it has no direct way to receive user interaction!

This chapter focuses on how to add interaction points to an application, specifically to Core Animation. We look at both mouse interaction and keyboard input.

The Click of a Mouse

The most common interaction users expect from your application is the ability to click the mouse on various interface ...

Get Core Animation: Simplified Animation Techniques for Mac 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.