个人觉得,在图形设备里头,宽高< 0
没有什么意义.所以下面使用的rect默认为width、height大于等于0
CGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height);
函数 | 值 |
---|---|
CGRectGetMinX(CGRect rect) | x |
CGRectGetMidX(CGRect rect) | (x + width) / 2 |
CGRectGetMaxX(CGRect rect) | x + width |
CGRectGetMinY(CGRect rect) | y |
CGRectGetMidY(CGRect rect) | (y + height) / 2 |
CGRectGetMaxY(CGRect rect) | y + height |