DTGradientButton
DTGradientButton copied to clipboard
cornerRadius and shadow BUG
There is a bug when i use button.layer.masksToBounds = false
I cant set it to true and use cornerRadius
so I must set as false to use cornerRadius and shadowColor together
code (objective-c):
self.button.layer.cornerRadius = 30;
self.button.layer.shadowOffset = CGSizeMake(0, 10);
self.button.layer.shadowColor = [UIColor blackColor].CGColor;
self.button.layer.shadowRadius = 20;
self.button.layer.shadowOpacity = 0.5f;
self.button.layer.masksToBounds = NO;
@CavalcanteLeo It is not possible to have layer.masksToBounds = false
and layer.cornerRadius
at the same time. You should google solution for this.
it is, the code works perfectly
@CavalcanteLeo I'll take a look.