Reputation: 25
How do you implement SKActionTimingFunction in objective-c?. I've looked everywhere and I just found an example in swift.
Thanks!
Upvotes: 1
Views: 541
Reputation: 3247
In Swift 4.2:
moveAction.timingFunction = { time -> Float in
return sin(time * .pi/2)
}
Upvotes: 0
Reputation: 8130
heres an example
moveAction.timingFunction = ^float(float t){
return sin(t * M_PI/2);
};
man i hate blocks in objective-c
Upvotes: 5