1

我正在使用 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];
4

0 回答 0