[obcj] UIButton, underline

iPhone 2013. 9. 14. 16:35



NSMutableAttributedString *attrStr = [[NSMutableAttributedString allocinitWithString:@"ボタン"];

    NSDictionary *attributes = @{                                 NSUnderlineStyleAttributeName@(NSUnderlineStyleSingle)};

    [attrStr addAttributes:attributes

                     range:NSMakeRange(0, attrStr.length)];

    

    [self.btn setAttributedTitle:attrStr forState:UIControlStateNormal];


    

Posted by tenn
,