Assign toValue from an int

36 views Asked by At

I'm doing an animation and want the toValue to get bigger every time i tap an image. My code will work (but doesn't now, of course), but how do you make a toValue an integer?

I have this:

int comboTapAnim = (comboTap / 10) + 1;

then in the animation:

theAnimation.toValue = [comboTapAnim];

Xcode no likey. I have tried other combinations but it must be an NSNumber but I want it to be an int.

1

There are 1 answers

0
Yugaman On BEST ANSWER

I found out the answer!!

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