PDA

View Full Version : Getting X and Y from CGPoint?




Buschmaster
Apr 9, 2008, 12:39 PM
I'm feeling pretty stupid right now because I can't figure out how to get the X and Y from the CGPoint.

Or, is there a way I can make a rectangle starting at a CGPoint?

Thanks!



gnasher729
Apr 9, 2008, 12:43 PM
I'm feeling pretty stupid right now because I can't figure out how to get the X and Y from the CGPoint.

Or, is there a way I can make a rectangle starting at a CGPoint?

Thanks!

What about this: In XCode, type CGPoint. Select it. Right-click and "Show Definition". Does that answer your question?

kainjow
Apr 9, 2008, 12:43 PM
point.x and point.y

Don't forget you can search data types in Xcode to find out more.

Edit: Expanding on gnasher729's post you can command-double-click CGPoint and be taken to its definition directly.

Buschmaster
Apr 9, 2008, 12:46 PM
What about this: In XCode, type CGPoint. Select it. Right-click and "Show Definition". Does that answer your question?
Thanks, I was unaware of this feature.

It will be very helpful in the future.

point.x and point.y

Don't forget you can search data types in Xcode to find out more.

Edit: Expanding on gnasher729's post you can command-double-click CGPoint and be taken to its definition directly.
Thanks.

:)