//小鑫原创转载请注明出处http://blog.csdn.net/wodeni521877
纯新手完全是手打得 不会用代码文本那个,所以大家复制粘贴的时候一定要小心点,注意大小写可能会有错字
上一个IOS文章小鑫说要再写一篇关于NSAttributedString的文章,这篇文章要写的是从一篇文章中为你想要标记个文字进行
高亮标记,废话不多说直接上代码。
NSMutableAttibutedString *seachAttributedString =[ [NSMutableAttributedString alloc] initWithString:@"111"];
NSString *beSearchedString = [NSString stringWithFormat:@"1112222111"];
NSRange seachRage = NSmakeRange (0,[seachAttributedString length]);
do{