cabasicanimation - how to repeat animation forever in Swift (HUGE_VALF)? -
according docs, way repeat cabasicanimation forever set repeatcount huge_valf.
but in swift, huge_valf causes compile error. swift doesn't seem know standard library (or wherever constant resides).
what do now?
set repeatcount float.infinity. compiles , works.
in probability, huge_valf legacy value in case.
still, it's bit of surprise these numeric constant names not seen swift. did seek importing <stdlib.h> in bridging header didn't help.
swift cabasicanimation
No comments:
Post a Comment