美文网首页
RTLable 越界错误

RTLable 越界错误

作者: LH_0811 | 来源:发表于2016-07-20 15:33 被阅读10次

    command + f 搜索 int position 替换成下面的代码

    int position = [data rangeOfString:delimiter options:NSCaseInsensitiveSearch range:NSMakeRange(last_position, [data length] - last_position)].location;
            if (position != NSNotFound && position >= last_position)
            {
                if ([delimiter rangeOfString:@"<p"].location==0)
                {
                    data = [data stringByReplacingOccurrencesOfString:delimiter withString:paragraphReplacement options:NSCaseInsensitiveSearch range:NSMakeRange(position, delimiter.length)];
                }
                else
                {
                    data = [data stringByReplacingOccurrencesOfString:delimiter withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(position, delimiter.length)];
                }
    
                data = [data stringByReplacingOccurrencesOfString:@"&lt;" withString:@"<"];
                data = [data stringByReplacingOccurrencesOfString:@"&gt;" withString:@">"];
            }
    
    

    相关文章

      网友评论

          本文标题:RTLable 越界错误

          本文链接:https://www.haomeiwen.com/subject/imvvjttx.html