Documentation of CGrectGet(Max|Min)Y is confusing
||Date Originated:||27-Mar-2013 03:56 PM|
|Status:||Duplicate of 12567769
||Resolved:||29-Mar-2013 07:44 PM|
||Product Version:||updated 2010-07-01|
Summary: Documentation for CGRectGetMaxY and CGRectGetMinY is misleading.
Steps to Reproduce:
Read the documentation for CGRectGetMaxY and CGRectGetMinY in the iOS Developer Library. The document I have is at http://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGGeometry/Reference/reference.html#//apple_ref/c/func/CGRectGetMaxY and was last updated on 2010-07-01.
The documentation for CGrectGetMinY should say:
>>> Returns the y-coordinate that establishes the top edge of a rectangle.
And the documentation for CGRectGetMaxY should say:
>>> Returns the y-coordinate that establishes the bottom edge of a rectangle.
The definitions of the two functions are reversed.
This was probably copied from the OS X Developer Library, and because of the flipped coordinate system, it is correct there. However, since CGRects on iOS are almost exclusively used with UIKit and Core Animation, which have the origin at the upper left corner, the existing documentation is somewhere between misleading and wrong.
Maybe it would be best to change both doc sets to express the idea of the min and max y-coordinates in a less ambiguous way.
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!