For iOS developers we usually getting the origin x by
rect.minX
instead of rect.origin.x
Because of less code.
That’s fine for 99% of the cases.
If the width or height is negative…
The rect.minX
will be rect.origin.x — rect.width
Hence,
When width of the rect is negative, origin.x will NOT equal to minX