UIBezierPath AutoLayout
suggest changeFor a Bézier path to be resized with the view, override drawRect: on the view that draws the path. The method’s argument is the dirty rectangle, so use self.bounds when the path should match the view:
- (void)drawRect:(CGRect)rect
{
UIBezierPath* rectanglePath = [UIBezierPath bezierPathWithRect:self.bounds];
[UIColor.grayColor setFill];
[rectanglePath fill];
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents