NSMutableAttributedString *commentString = [[NSMutableAttributedString alloc] initWithString:@"Restore"];
[commentString addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:NSMakeRange(0, [commentString length])];
[_button_restoreOutlet setAttributedTitle:commentString forState:UIControlStateNormal];
************************
NSDictionary * linkAttributes = @{NSForegroundColorAttributeName:_button_closeOutlet.titleLabel.textColor, NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle)};
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:_button_closeOutlet.titleLabel.text attributes:linkAttributes];
[_button_closeOutlet.titleLabel setAttributedText:attributedString];
************************
let attrs: [NSAttributedString.Key: Any] = [
.foregroundColor: UIColor.black,
.underlineStyle: NSUnderlineStyle.styleSingle.rawValue]
let attributeString1 = NSMutableAttributedString(string: "Terms & Conditions",
attributes: attrs)
button_termsOutlet.setAttributedTitle(attributeString1, for: .normal)