• 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: UIBezierPath: trying to create an array with CGPointMake
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIBezierPath: trying to create an array with CGPointMake


  • Subject: Re: UIBezierPath: trying to create an array with CGPointMake
  • From: Lee Ann Rucker <email@hidden>
  • Date: Mon, 20 Dec 2010 14:42:44 -0800
  • Acceptlanguage: en-US
  • Thread-topic: UIBezierPath: trying to create an array with CGPointMake

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@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: 
 >UIBezierPath: trying to create an array with CGPointMake (From: colo <email@hidden>)
 >Re: UIBezierPath: trying to create an array with CGPointMake (From: Fritz Anderson <email@hidden>)
 >Re: UIBezierPath: trying to create an array with CGPointMake (From: colo <email@hidden>)

  • Prev by Date: Re: Cocoa view gets sluggish over time
  • Next by Date: Re: access multiple NSTextFields as an array?
  • Previous by thread: Re: UIBezierPath: trying to create an array with CGPointMake
  • Next by thread: Modal loop memory leak on 10.6
  • Index(es):
    • Date
    • Thread