I have changed titles of UIButton
s before using:
- (void)setTitle:(NSString *)title forState:(UIControlState)state
But I\'ve r
Swift - For a red strikethrough font in a button title:
let attributedStringForInvalid = NSAttributedString(string: "I'm Invalid!", attributes: [
NSStrikethroughStyleAttributeName: true,
NSForegroundColorAttributeName: UIColor.redColor()
])
myButton.setAttributedTitle(attributedStringForInvalid, forState: UIControlState.Normal)