paxfed.blogg.se

Stroke width ignores scale after effects
Stroke width ignores scale after effects




stroke width ignores scale after effects

Layers can have sublayers: Just like views can have subviews, layers can have sublayers.Here are a few more things you should know about CALayer before you dive into the Layer Player app: If you call layoutIfNeeded() on a UIView, the call gets forwarded to the root CALayer. When you set bounds on a UIView, the view in turn sets bounds on its backing CALayer. UIView, in fact, is just a wrapper over CALayer.Įach UIView has one root CALayer, which can contain multiple sublayers. UIKit delegates that task to the Core Animation framework, which enables the use of CALayer. However, it doesn’t directly control drawing or animations. UIView handles many things, including layout and touch events. This will give you a deeper understanding of the power of each capability you explore.īut first, some theory. After adding each line of code, play around with the settings you’ve just enabled. In each section, you’ll add the necessary code to make the layer magic work. You’re about to write the code to turn this app into a fully functional CALayer tour guide! The Layer Player app demonstrates nine different CALayer capabilities.

stroke width ignores scale after effects

Open it in Xcode, then build and run to see what you’re starting with. Use the Download Materials button at the top or bottom of this tutorial to download the starter project. What better way to get an overview of this great API than by taking a -style guided tour? It has several subclasses with unique properties and methods. How to use CALayer functionality to achieve cool effects like shapes, gradients and even particle systems.ĬALayer has more than a few properties and methods to tinker with.In this article, you’ll build the Layer Player app. There are button views, table views, slider views and even parent views that contain other views!īut what you might not know is that each view in iOS is backed by another class called a layer - a CALayer, to be specific. Scott Gardner wrote the original.Īs you probably know, everything you see in an iOS app is a view. Update note: Ron Kliffer updated this tutorial for Xcode 11, Swift 5 and iOS 13.






Stroke width ignores scale after effects