Ios6 如何设置属性文本中下划线的宽度

Ios6 如何设置属性文本中下划线的宽度,ios6,nsattributedstring,underline,Ios6,Nsattributedstring,Underline,我正在使用UITextView并向其添加属性文本。我想根据字体大小为文本设置下划线,但我只能将大小设置为1。如果有人对此有任何想法,请告诉我 我使用的代码是:- NSDictionary* dict = nil; dict = @{NSForegroundColorAttributeName:[UIColor blackColor], NSBackgroundColorAttributeName: [UIColor clearColor], NSUnderl

我正在使用UITextView并向其添加属性文本。我想根据字体大小为文本设置下划线,但我只能将大小设置为1。如果有人对此有任何想法,请告诉我

我使用的代码是:-

NSDictionary* dict = nil;
dict = @{NSForegroundColorAttributeName:[UIColor blackColor],
         NSBackgroundColorAttributeName: [UIColor clearColor],
          NSUnderlineStyleAttributeName: @1
               };
TextView.attributedText = [[NSAttributedString alloc]initWithString:@"String to be underline" attributes:dict];