This is because OpenGL View (class EAGLView) uses a different coordinate system than Cocoa Touch.
For example, the 0.0 position for Cocoa Touch is in the upper left corner, while the 0.0 position for OpenGL is in the lower left corner. This is why you need to "convert to GL" all UIView coordinates.
The conversion also takes into account the current orientation of the device.
LearnCocos2D
source share