Which, if either, of these methods would be an appropriate place to:
- Change the text of a CATextLayer
- Load a different image into a CAImageLayer
- Tell sublayers to update themselves
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Dude I may be way drunk … but there is NO drawRect method in
CAlayersI think you can use
drawInContext:to actually (gulp) draw in to CALayers, but nobody is man enough to do that since WW2.Regarding display, you don’t need to call it, it basically updates what you set using
.contents.I just use
.contentssomething like this …Say one had the guts to write one’s own
drawInContext:…In that case, it gets called (or abstracted out … or recalculated, or something) when you call
displayAsNeeded. (I’ve never needed to calldisplayAsNeeded:, that’s for sure.)