Can anyone please suggest alternative to this line of code so that my code becomes compatible with ARC.
[animation setTimingFunction:(CAMediaTimingFunction*)UIViewAnimationCurveEaseInOut];
That code isn't correct even in MRR (non-ARC). The only reason it's not crashing is because UIViewAnimationCurveEaseInOut
happens to have the value of 0
(which becomes nil
after the cast).
Instead you should be using
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
This will do what you're intending to do, except with an actual instance of CAMediaTimingFunction*
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With