1

View geometry in UIKit specifies that it acts on an axis starting from the top left corner (0,0) and increasing in x and y as you travel toward the bottom right.

UIOffsetMake() is used a lot in UIKit Dynamics, and I was wondering if it follows a similar model. It's used to specify, relative to the center of the UIView, where you want the point where the view gets pushed to originate from.

If I specify UIOriginMake(5.0, -5.0) does it change it from the center to further in the bottom right? As in it goes down 5 vertically and 5 over horizontally? Or does it follow the traditional UIView model where that would indicate it goes 5 points over horizontally and 5 points up vertically?

I have no reason to think it doesn't follow UIView's model, but I wasn't positive and I wanted to make sure.

Doug Smith
  • 29,668
  • 57
  • 204
  • 388
  • Did you try it? What was the result? Seems it would be quicker than posting a question and waiting for an answer. – rmaddy Feb 13 '14 at 02:57
  • 2
    @rmaddy I don't only ask for my own benefit, I ask in case others have a similar question and they'll be able to find the answer. Isn't that the point of StackOverflow? – Doug Smith Feb 13 '14 at 03:48

1 Answers1

5

You'll find the answer in the docs for the UIOffset struct:

The components are positive for right or down, negative for left or up.

Sebastian
  • 7,670
  • 5
  • 38
  • 50