Use the setFont: range: ? but what i want to do here is only to make the selection bold as the selection may have different font attribute,so,anyone can tell that?
Like this:
NSMutableAttributedString* text = [textView textStorage];
[text applyFontTraits:NSBoldFontMask range:NSMakeRange(0,[text length])];
where the range is the range of text you want to make bold.