这个代码在objective-c中意味着什么?
[CATransaction withAnimationSpeed:1.0 :^ {
if(newMultiplier > 100)
fillLayer.backgroundColor = ColRGBA(1, 1, 0, 0.2);
else
fillLayer.backgroundColor = ColRGBA(0, 0, 0, 0);
}];
^ {}是什么意思?为什么要用这个符号。
没有找到相关结果
已邀请:
1 个回复
嗓瑰
这样的Objective-C方法。
是块的符号。
中的代码就像方法的
块中的代码一样。 某些块具有与C函数类似指定的参数:
在您给定的代码中,
与
相同,即该块不带任何参数。