drawRect:- This is what is called automatically when a message setNeedsDisplayor setNeedsDisplayInRect:in a view. You never call drawRect:directly.
However, you are correct that all drawing operations are performed within the framework of the method drawRect:. Typical implementation:
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
}
UIBezierPath s, , , setNeedsDisplay, - .
- (void)drawRect:(CGRect)rect {
for ( UIBezierPath * path in bezierPaths ) {
[path fill];
[path stroke];
}
}
bezierPaths - UIBezierPath s.