Sprite kit SKLabelNode+;NSAttributedString+;NSShadowAttributeName正在剪辑内容
当将Sprite kit SKLabelNode+;NSAttributedString+;NSShadowAttributeName正在剪辑内容,sprite-kit,nsattributedstring,sklabelnode,Sprite Kit,Nsattributedstring,Sklabelnode,当将SKLabelNode与实现NSShadowAttributeName属性的nsAttributeString一起使用时,结果将被剪裁 NSString *string = @"123"; NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:string]; NSShadow *shadow = [[NSShadow alloc]
SKLabelNode
与实现NSShadowAttributeName
属性的nsAttributeString
一起使用时,结果将被剪裁
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似乎正在将其阴影剪裁到一些未知的边界
是否有任何方法可以禁用此剪辑,或者例如,向节点添加填充以避免出现这种情况