You could probably start by studying the documentation for CGPathRef, which lets you create, manipulate and draw bezier paths. These are C, not Objective-C API calls, but they work perfectly fine in an Objective-C application. iPhone OS 3.2 adds UIBezierPath, with wraps these calls, but if you want to target devices running an earlier version of the OS, it wouldn't make sense to use it.

One benefit of using the CGPath API is that this is also available as part of CoreGraphics on the Mac, so you're likely to be able to find more sample code out there.

A quick Google search returned this hit (http://www.cocos2d-iphone.org/forum/topic/1376 ), which talks about moving sprites along a path and references other info that might be helpful.


On Apr 12, 2010, at 11:06 PM, charisse napeÿfffff1as wrote:

I'm a newbie at iphone development and I was wondering if somebody can point out how to create a simple app where I can draw a simple path with loops or curves from point a to b and then make an object follow that path from a to b. Anybody can give me a sample code or something so I can study it?
Thanks,
Charisse

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to