it really doesn’t make sense to me why we can change this line :
I understand the first line. It’s in C and we specify the context and the stroke color for it.
But what about the second line?
First it seems we are dynamically creating an UIColor object. Then we are sending it the setStroke message. But :
- How can this object know to set the stroke of a context since we never tell to this object wich context to target?
- Can we simply create an object like this [UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1.0] without alloc nor init, nor pointer?
I would appreciate any insight there. I really don’t get how this object can tell the context wich stroke to use without even knowing its existence