Re: NSBezierPath on iOS?
Re: NSBezierPath on iOS?
- Subject: Re: NSBezierPath on iOS?
- From: Steve Mills <email@hidden>
- Date: Mon, 22 May 2017 08:08:31 -0500
On May 22, 2017, at 06:23:32, Dave <email@hidden> wrote:
>
> I changed it to use UIBezierPath but now I get errors on the 3 + methods it uses - fillRect, setDefaultLineWidth and strokeRect.
It would really help if we knew what the errors were.
> myPath = [UIBezierPath bezierPathWithRect:myRect];
> [self.pPaneColor set];
> [myPath fill];
If you're simply filling a rect, there are simpler ways:
UIRectFill(rect);
> Also, I’m guessing it should be setNeedsDisplayInRect instead of setNeedsDisplay,
>
> I changed this to:
>
> [self setNeedsDisplayInRect:self.frame];
>
> Is this correct or should it be self.bounds?
It totally depends on what you're trying to do, and from where. If you just need your entire view to redraw, use setNeedsDisplay. If it's a more localized, specific rect you need to redraw, use setNeedsDisplayInRect and give it a rect local to the view.
--
Steve Mills
Drummer, Mac geek
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden