• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBezierPath on iOS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSBezierPath on iOS? (From: Dave <email@hidden>)
 >Re: NSBezierPath on iOS? (From: Dave <email@hidden>)
 >Re: NSBezierPath on iOS? (From: email@hidden)
 >Re: NSBezierPath on iOS? (From: Dave <email@hidden>)
 >Re: NSBezierPath on iOS? (From: Dave <email@hidden>)

  • Prev by Date: Re: NSBezierPath on iOS?
  • Next by Date: Re: Autolayout Problem/Question
  • Previous by thread: Re: NSBezierPath on iOS?
  • Next by thread: Autolayout Problem/Question
  • Index(es):
    • Date
    • Thread