Learn how to mask CALayers and then review what you've learned in the CALayers video tutorial series.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3246-calayers/lessons/5
Learn how to mask CALayers and then review what you've learned in the CALayers video tutorial series.
Great lecturer, very clear.
Awesome video series on CALayers. Thank your very much Caroline!
Amazing course, everything clear.
I like that you have a distinction in this series between code that’s intended to run once, late in one of the multiple initializers: setup
, and other code that will run multiple times: configure
. Are you still using this convention? Although it’s a common pattern, I haven’t seen consensus on what people call these types of functions.
@jcatterwaul - I like that you pick up on these things. I tend to look at results and code readability primarily and secondly the structure of how we got there. So when you ask a question on why it’s called setup
- I would call it that because that’s what it does. I haven’t thought about a convention. But I would like there to be one, so that I can use it consistently.
I think that setup
and configure
are a good way to go with this. Ray originally did this series, and that naming convention is quite probably what he had in mind. So let’s run with it?
Thank you for the great lecture… …,
@caroline After learning all this videos, I have some questions, As we all know, code like below will cause off-screen rendered.
imageView.layer.cornerRadius = CGRectGetHeight(imageView.bounds)/2.0
imageView.layer.masksToBounds = true
so
masksToBounds
will cause off-screen rendered, could you explain all of these ?@caroline Can you please help with this when you get a chance? Thank you - much appreciated! :]