1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Getting X and Y from CGPoint?

Discussion in 'Mac Programming' started by Buschmaster, Apr 9, 2008.

  1. macrumors 65816


    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?

  2. macrumors G5


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


    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.
  4. macrumors 65816


    Thanks, I was unaware of this feature.

    It will be very helpful in the future.



Share This Page