I\'m trying to add a 1px black drop shadow to a button label with no luck. I\'ve tried this:self.setTitleShadowOffset = CGSizeMake(0, -1); but I get:
self.setTitleShadowOffset = CGSizeMake(0, -1);
In Swift 3.0
myButton.titleLabel?.layer.shadowRadius = 3 myButton.titleLabel?.layer.shadowColor = UIColor.black.cgColor myButton.titleLabel?.layer.shadowOffset = CGSize(width: 0, height: 1) myButton.titleLabel?.layer.shadowOpacity = 0.5 myButton.titleLabel?.layer.masksToBounds = false