¡@

Home 

2014/10/15 ¤U¤È 10:04:00

iphone Programming Glossary: ashape

How do I detect a touch on a UIBezierPath and move a ball along that?

http://stackoverflow.com/questions/4854035/how-do-i-detect-a-touch-on-a-uibezierpath-and-move-a-ball-along-that

path inFillArea BOOL inFill How do I detect a touch along a path This is what I've tried so far UIBezierPath aShape UIBezierPath bezierPathWithOvalInRect CGRectMake 0 0 200 100 UIColor blackColor setStroke UIColor redColor setFill CGContextRef.. setStroke UIColor redColor setFill CGContextRef aRef UIGraphicsGetCurrentContext CGContextTranslateCTM aRef 50 50 aShape.lineWidth 5 aShape fill aShape stroke aShape closePath CGPoint x CGPointMake 30 40 if aShape containsPoint x NSLog @ in.. redColor setFill CGContextRef aRef UIGraphicsGetCurrentContext CGContextTranslateCTM aRef 50 50 aShape.lineWidth 5 aShape fill aShape stroke aShape closePath CGPoint x CGPointMake 30 40 if aShape containsPoint x NSLog @ in else NSLog @ out void..