marcosgriselli / ViewAnimator

ViewAnimator brings your UI to life with just one line
MIT License
7.3k stars 488 forks source link

Is this library compatible with Objective C? #13

Closed jlubeck closed 6 years ago

jlubeck commented 7 years ago

I tried using it and the only exposed method for a view is "animateRandomWithInterval"

Thanks

marcosgriselli commented 6 years ago

Right now it's not due to the default animations depending on the AnimationType enum which cannot be represented in Objective-C as they use associated values.

From Xcode 6.3 release notes:

Swift Language Enhancements ... Swift enums can now be exported to Objective-C using the @objc attribute. @objc enums must declare an integer raw type, and cannot be generic or use associated values. Because Objective-C enums are not namespaced, enum cases are imported into Objective-C as the concatenation of the enum name and case name.

Source