富文本初探
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> NSMutableAttributedString *str2 = [[ NSMutableAttributedString alloc ] initWithString : @"abcdfui\nABCDjalkdafjf;" ]; [str2 beginEditing ]; [str2 addAttribute : NSFontAttributeName value :[ UIFont systemFontOfSize : 14 ] range : NSMakeRange ( 0 , 4 )]; [str2 addAttribute : NSUnderlineStyleAttributeName value : @( NSUnderlineStyleSingle ) range : NSMakeRange ( 3 , 6 )]; [str2 addAttribute : NSForegroundColorAttributeName value :[ UIColor cyanColor ] range : NSMakeRange ( 0 , 5 )]; [str2 addAttribute : NSLinkAttributeName value :[ NSURL URLWithString : @"http: