一般的设置圆形方法
UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(100, -120, 100, 100)];
imageV.backgroundColor = [UIColor orangeColor];
imageV.layer.masksToBounds = YES;
imageV.layer.cornerRadius = 50.f;
可是如果只改变下frame坐标
UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(100, -120, 95.f, 95.f)];
imageV.backgroundColor = [UIColor orangeColor];
imageV.layer.masksToBounds = YES;
imageV.layer.cornerRadius = 95.0 / 2.f;
就会出现UIImageView不是一个正圆的问题(很细微要仔细看)
目前解决方法:
CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>)
里四个参数全部使用NSInteger类型, (造成原因不明)