M mbpc2d.user macrumors newbie Original poster Apr 4, 2008 20 0 Apr 13, 2008 #1 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?
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 Apr 14, 2008 #2 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?
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?
K kainjow Moderator emeritus Jun 15, 2000 7,958 7 Apr 14, 2008 #3 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.
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.
M mbpc2d.user macrumors newbie Original poster Apr 4, 2008 20 0 Apr 14, 2008 #4 kainjow said: 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. Click to expand... yeah, that was my problem. I wasn't expecting %d to automatically assume unsigned, although thats what I thought was happening. Thanks
kainjow said: 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. Click to expand... yeah, that was my problem. I wasn't expecting %d to automatically assume unsigned, although thats what I thought was happening. Thanks