我想给一个UIButton添加一个下拉阴影。我尝试使用self.layer.shadow*属性。这些属性在UIView中有效,但在UIButton中表现不同。如果有任何指针可以绘制下拉阴影,我将不胜感激。谢谢!
self.layer.cornerRadius = 8.0f;
self.layer.masksToBounds = YES;
self.layer.borderWidth = 1.0f;
self.layer.shadowColor = [UIColor greenColor].CGColor;
self.layer.shadowOpacity = 0.8;
self.layer.shadowRadius = 12;
self.layer.shadowOffset = CGSizeMake(12.0f, 12.0f);