开发者

About CGRectMake

开发者 https://www.devze.com 2023-02-06 00:34 出处:网络
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:

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

精彩评论

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