【问题标题】:Assign toValue from an int从 int 分配 toValue
【发布时间】:2015-06-11 19:22:39
【问题描述】:

我正在制作动画,并且希望每次点击图像时 toValue 都会变大。我的代码可以工作(当然现在不行),但是如何将 toValue 设为整数?

我有这个:

int comboTapAnim = (comboTap / 10) + 1;

然后在动画中:

theAnimation.toValue = [comboTapAnim];

Xcode 不太可能。我尝试过其他组合,但它必须是 NSNumber,但我希望它是 int。

【问题讨论】:

    标签: xcode integer cabasicanimation


    【解决方案1】:

    我找到答案了!!

    [NSNumber numberWithInt:<#(int)#>]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-15
      • 1970-01-01
      • 1970-01-01
      • 2014-10-10
      • 2011-09-03
      • 1970-01-01
      • 1970-01-01
      • 2010-11-14
      相关资源
      最近更新 更多