On Dec 20, 2010, at 8:23 AM, colo wrote:
Because i'm really stupid. :P I'm truly hacking away trying to
translate the following method of code into iOS specific code to run
on the ipad. I'm still totally in a learning stage, cram a widget into
a socket and see if it works. No real good arguments for the way I am
trying this, but I can't seem to find a translation list for
converting methods of NSRect => CGRect => iOS UIBezierPath.
I thank you for the heads up on the Void issue. My fault. What I was
trying to find was a replacement for NSMakePoint, I saw the naming
scheme CGPointMake but could not get it to give me a decent compile
without using CGPointMake in some type of attribute of UIBezierPath
hence the moveToPoint, I thought there might be a createPointAt but
don't see anything like that.
Previous Cocoa code
- (IBAction)resetControlPoints:(id)sender
{
NSRect bounds = [self bounds];
points[0] = NSMakePoint(0.25 * bounds.size.width, 0.25 * bounds.size.height);
points[1] = NSMakePoint(0.25 * bounds.size.width, 0.75 * bounds.size.height);
points[2] = NSMakePoint(0.75 * bounds.size.width, 0.75 * bounds.size.height);
points[3] = NSMakePoint(0.75 * bounds.size.width, 0.25 * bounds.size.height);
[self setNeedsDisplay:YES];
}
______
I've ported an NSBezierPath app to a UIBezierPath app, and I'm not sure why
you're having trouble. I got a long way with search-and-replace. What sort of
compiler errors did you get from replacing NSMakePoint with CGPointMake? You
did replace the NSPoint with CGPoint in the variable declaration, right?
It's open source so if you want to look at the code, go to
http://homepage.mac.com/lrucker/XTide/ and
http://homepage.mac.com/lrucker/TideTracker/
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]