问题描述
将SKLabelNode
与实现了NSAttributedString
属性的NSShadowAttributeName
一起使用时,结果将被裁剪。
Nsstring *string = @"123";
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:string];
NSShadow *shadow = [[NSShadow alloc] init];
shadow.shadowColor = [UIColor blackColor];
shadow.shadowBlurRadius = 10;
shadow.shadowOffset = CGSizeMake(0,10);
[attributedString addAttributes:@{NSShadowAttributeName : shadow}
range:NSMakeRange(0,string.length)];
labelnode似乎将其阴影裁剪到一些未知范围。
是否有任何方法可以禁用此裁剪,例如,向节点添加填充以免发生这种情况?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)