Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mbpc2d.user

macrumors newbie
Original poster
Apr 4, 2008
20
0
I am getting the CGPoint from locationInView, and I can't figure out the numbers its producing. They are HUGE (around 1,000,000,000). Are they supposed to be that big, or did I forget something?
 

Buschmaster

macrumors 65816
Feb 12, 2006
1,306
27
Minnesota
If you try and use CGPoint strictly as a string the numbers will be huge and from what I can tell it's more of just a code than an actual point.

However, if you're trying to use something like CGRectMake where you need a specific x and y, you can use point.x and point.y assuming CGPoint point;

Does that make sense?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
If you're using something like NSLog to check the values, make sure you use %f instead of %d/%i because the x and y values are floats, not integers.
 

mbpc2d.user

macrumors newbie
Original poster
Apr 4, 2008
20
0
If you're using something like NSLog to check the values, make sure you use %f instead of %d/%i because the x and y values are floats, not integers.

yeah, that was my problem. I wasn't expecting %d to automatically assume unsigned, although thats what I thought was happening.

Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.