首页 > CGpoint,CGSize,CGRect,NSRange

CGpoint,CGSize,CGRect,NSRange

    NSRange (范围);(location,位置  length,长度;

    NSPoint /CGpoint(点);

    NSSize /CGSize(大小)

 

    CGPoint p1 = CGPointZero == CGPointMake(0, 0)代表原点

  

    CGSizeZero == CGSizeMake(0, 0);代表大小为0

 

    CGRect rec = CGRectMake(0, 0, 10, 10);

    CGRect re = CGRectMake(CGPointMake(<#CGFloat x#>, <#CGFloat y#>), CGSizeMake(<#CGFloat width#>, <#CGFloat height#>))

 

    //判断两个坐标是否相等

    BOOL b = CGPointEqualToPoint(CGPointMake(10, 10), CGPointMake(10, 10));

转载于:https://www.cnblogs.com/lanmaokomi/p/8471472.html

更多相关: