我试图给UIButton层增加一个阴影,但出于某种原因,它削减了丁顿的界限。 页: 1 ToBounds被拒之门外,因此,我不敢肯定为什么要这样看:
就像这一点一样,它有点模糊不清,即使阴影不应被混为一谈。
button.clipsToBounds = NO;
button.layer.masksToBounds = NO;
button.layer.shadowOffset = CGSizeZero;
button.layer.shadowPath = [UIBezierPath bezierPathWithRect:button.layer.bounds].CGPath;
button.layer.shadowOpacity = 0.7;
button.layer.shadowColor = [UIColor blackColor].CGColor;
button.layer.shadowRadius = 10;
我没有什么东西?
Oh, and my button is a subclass of UIButton. I m not sure if that makes a difference.. -Even with a shadowRadius of 0.0, I get a fully visible black square as my shadow