在用texture写聊天页面时,发现用ASImageNode加载带有slice的image时,总是crash,具体信息为
他的意思是说,我们现在加载的图像的inset必须全部为zero或者resizingMode必须是UIImageResizingModeStretch类型,但是XCode的assets(我把image放在了工程中的asset里)默认是UIImageResizingModeTile(平铺)而这个模式不被Texture支持的,因为texture是GPU加速的CALayer特性.
but stretching is defined in Images.assets via Slicing - then app crashes.
It’s not happening if code looks like:
_backgroundImageNode.image = [[UIImage imageNamed:@"card_stretchable"] resizableImageWithCapInsets:UIEdgeInsetsMake(12.0f, 13.0f, 12.0f, 13.0f) resizingMode:UIImageResizingModeStretch];