KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I always used CoreGraphics and CoreAnimation, I understand how each of them works on their own, but not those edge cases when one have to talk with the other. I also understand that UIView s are a nice wrapper for CALayer , where CALayer does all the heavy lifting of rendering, and the UIView adds the touch-based responsiveness. But, all the questions I have seen thus far, attack the problem from one side or the other, not the interplay between them, specially between CoreGraphics and CALayer . Anyway, my question is ... How does CoreGraphics relate to CALayer? My understanding is that a CALayer wraps the CoreGraphics methods to draw itself, but does it once, and can live with the snapshot of itself until invalidated. But, how these drawing methods interplay with the sublayers of that layer? Are they exclusive? For example, what happens when I have a UIView that has sub-views, and I overload the drawRect method? How does that affect the drawing of its sublayers? Is it even a good idea to intermix the two inside the same function? Also, I'm asking only about iOS , I understand that Mac is a different beast (and also have those fancy CIFilters , bastards!). Prior Research Here's some related questions I've researched beforehand: confusion regarding quartz2d, core graphics, core animation, core images . This question asks the differences between each other, and the chosen answer indeed delivers, but it answers for each individual library as if the other didn't exist. To Drawrect or not to D
Tags (comma-separated)
Save Edits
Cancel