Open zhangxiongwen opened 7 years ago
NSMutableAttributedString attStr = [[NSMutableAttributedString alloc]initWithString:@"所谓优美"]; //文本内阴影 YYTextShadow shadow = [YYTextShadow new]; shadow.color = [UIColor greenColor]; shadow.offset = CGSizeMake(0, 2); shadow.radius = 1; [attStr yy_setTextInnerShadow:shadow10 range:attStr1.yy_rangeOfAll];
YYTextView *textView = [[YYTextView alloc]initWithFrame:CGRectMake(10, 10, 200, 200)]; textView.backgroundColor = [UIColor lightGrayColor]; textView.attributedText = attStr; [self.view addSubview:textView];
我是在一个界面跳到另外一个界面(这个界面中给YYTextView中的富文本设置YYTextShadow)去的,如果新的界面中最后一个字设置了YYTextShadow属性,那么点击后还没有跳转这个界面就直接卡死了
NSMutableAttributedString attStr = [[NSMutableAttributedString alloc]initWithString:@"所谓优美"]; //文本内阴影 YYTextShadow shadow = [YYTextShadow new]; shadow.color = [UIColor greenColor]; shadow.offset = CGSizeMake(0, 2); shadow.radius = 1; [attStr yy_setTextInnerShadow:shadow10 range:attStr1.yy_rangeOfAll];
YYTextView *textView = [[YYTextView alloc]initWithFrame:CGRectMake(10, 10, 200, 200)]; textView.backgroundColor = [UIColor lightGrayColor]; textView.attributedText = attStr; [self.view addSubview:textView];