From the course: Advanced iOS App Development: Core Animation

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with shape properties

Working with shape properties - iOS Tutorial

From the course: Advanced iOS App Development: Core Animation

Start my 1-month free trial

Working with shape properties

- [Narrator] Our first foray into shape animations, is gonna be with this nifty little square that's already set up in the starter project on the dashboard view. For the rest of the module, we'll be looking at different layer classes, and how to animate some of their unique properties. Now the square we've got is a CAShape layer, which has animatable properties that we can manipulate, that we hadn't had access to before. This being the path, fill color, line dash phase, stroke start and end, and line width. You can see at the top of the dashboard view controller file that our square is defined here, our circle, and later on in the module, our triangle. Now that's just for reference just so you know where it is. Now the square here has a line dash pattern already set up, which is what gives it that broken line around the edges, and we can animate this through the line dash phase property. A goal here is to make the lines appear like they're moving around the square's edges, creating a…

Contents