When would a UIView's bounds.origin not be (0, 0)?

后端 未结 4 977
遥遥无期
遥遥无期 2021-02-02 07:15

When would an UIView\'s bounds.origin not be (0, 0)?

This paragraph was helpful to me:

IMPORTANT!! Bounds X and Y, the

4条回答
  •  遇见更好的自我
    2021-02-02 07:57

    (edited again because I can’t delete my original answer after it was accepted—credit for this goes to ian, who posted a more thorough answer below:)

    In most cases this won’t happen. If you initialize your view with a negative width and/or height, you’ll get an origin with a negative X of the width and/or negative Y of the height.

提交回复
热议问题