• 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
iPhone: CGPathMutable updating?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iPhone: CGPathMutable updating?


  • Subject: iPhone: CGPathMutable updating?
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Mon, 11 Jan 2010 13:30:05 -0500

I am using a CGPathMutable to draw the hand on an analog clock:

minuteHandPath = CGPathCreateMutable();

CGPathMoveToPoint(minuteHandPath, nil, center.x, center.y);

CGPathAddLineToPoint(minuteHandPath, nil, center.x, center.y - 105);

CGPathCloseSubpath(minuteHandPath);

minuteHandLayer = [CAShapeLayer layer];

minuteHandLayer.path = minuteHandPath;

UIColor *myStrokeColor2 = [UIColor colorWithHue:0.6 saturation:0.24
brightness:0.71 alpha:1.0];

minuteHandLayer.strokeColor = myStrokeColor2.CGColor;

minuteHandLayer.lineWidth = 2.0;

[rootLayer addSublayer:minuteHandLayer];


In another method I would like to update this, say to change the color of
it. How can I do this? Presently I have tried:


- (void) myMethod {

    minuteHandPath = CGPathCreateMutable();

    //...

}


This gives me an error. I don't see a way yet to clear the path out and
redraw it using CGPathMoveToPoint, etc.


?
_______________________________________________

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

  • Follow-Ups:
    • Re: iPhone: CGPathMutable updating?
      • From: "Eric E. Dolecki" <email@hidden>
  • Prev by Date: Hyperlinks in Table Views
  • Next by Date: Re: Enabling NSZombieEnabled programatically
  • Previous by thread: Re: Hyperlinks in Table Views
  • Next by thread: Re: iPhone: CGPathMutable updating?
  • Index(es):
    • Date
    • Thread