UIView-EasingFunctions
UIView-EasingFunctions copied to clipboard
Animation doesn't work in iPhone 5S (iPhone 64bits)
In the Simulator, animation has a strange behavior. In the device, no animation works.
So, umm, does it?
The problem comes from AHEasing. I needed to define AH_EASING_USE_DBL_PRECIS
in my Pods-environment.h file. In 64bits, the app don't use float
but double
. When you use CGFloat
the change works fine but AHEasing use its proper float named AHFloat
.
I'll reopen the issue just so I remember to do something about it.
I suggest a pull request to AHEasing author.
https://github.com/warrenm/AHEasing/pull/8
Just define AH_EASING_USE_DBL_PRECIS
if it's __LP64__
Switching on AH_EASING_USE_DBL_PRECIS didn't work when I attempted... all that seemed to do was stop easing altogether.
However, switching the typedef in this library from
typedef CGFloat (*ViewEasingFunctionPointerType)(CGFloat);
to
typedef float (*ViewEasingFunctionPointerType)(float);
Seems to solve it, at least for me. Thoughts?
Hard to tell without looking at the code/project.
@jkosoy's suggestion solved it for me too, thanks!
@jkosoy's suggestion worked for me too.
@jkosoy's suggestion worked. Would love to get this committed.
For what it's worth I don't believe that my solution was appropriate for the library - it was just a hotfix for the problem. I haven't had time to build a correct solution myself -- should I find the time I'll submit a pull request.
Yeah , one day it worked , the next day it isn't .
So - the problem I am facing is that suddenly changing
typedef CGFloat (_ViewEasingFunctionPointerType)(CGFloat); to typedef float (_ViewEasingFunctionPointerType)(float);
works for some days , then it doesn't after some 10 - 20 compiles , then you change it back to
typedef CGFloat (*ViewEasingFunctionPointerType)(CGFloat);
and it miraculously will start working once again for the next 10 - 20 compiles. Right now i changed CGFloat to AHFloat thinking at this might just work every time.
Haven't faced any problem since i changed as per the comment above.
Specifically created a new repo which changes the implementation inside but works almost in the same way, couldn't add bouncy & elastic animations but if you are using other easings you should try it. https://github.com/thegreatloser/UIView-Easing
I'm facing a strange problem with iPhone 5S, when animating a frame, changing only it's origin.y value, on a iPhone 4S everything works fine, but on iPhone 5S the origin values (x and y) gets changed to a value lower than it should be, then when the animation ends, it gets back to desired value.
it seems to be related to iOS8, I tested on iPhone4S with iOS8 and the same problem happened.
@DenninDalke - try the repo above
I tried and it worked, but I'd like to have elastic easing working too.