开发者

About CGRectMake

This will sound extremely silly and stupid, but I have touched a couple languages and they kind of messed up my sense of.... orientation or something:

In Objective-C, you can use开发者_开发技巧 CGRectMake(x,y,w,h) to make a rect. Cool.

So x,y set the... top left corner of the rect, or.... the center of the rect?


In UIKit, (x,y) is the upper-left corner.


Cocoa uses the Cartesian coordinate plane as its coordinate system (so (x, y) is set to the bottom-left corner). You can read more about the coordinate system in the Cocoa Drawing Guide.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜