Skip to content

Commit

Permalink
iOS: Remove keyframes, update Lottie to latest, use Carthage for nati…
Browse files Browse the repository at this point in the history
…ve dependency (#43)

* chore: remove keyframes

* chore: use Lottie framework instead of manual header files

* feat: rename LottieView to AnimationView, bump version, update readme

* fix: fine-tune .gitignore
  • Loading branch information
hansemannn authored and m1ga committed Jan 25, 2019
1 parent bb24bad commit caf95d4
Show file tree
Hide file tree
Showing 210 changed files with 293 additions and 15,694 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ android/dist
android/java-sources.txt
android/build.properties
ios/ti.animation.xcodeproj/project.xcworkspace/xcuserdata/*
.DS_Store
ios/Cartfile.resolved
ios/Carthage
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
# Ti.Animation [![Build Status](https://travis-ci.org/m1ga/ti.animation.svg?branch=master)](https://travis-ci.org/m1ga/ti.animation)
# Ti.Animation

![gif](animation.gif)

Appcelerator Titanium Android module for [Facebooks Keyframes](https://github.com/facebookincubator/Keyframes) libray and for [Airbnb Lottie](https://github.com/airbnb/lottie-android).
Appcelerator Titanium Android module to support smooth and scalable animations using [Airbnb Lottie](https://airbnb.design/lottie/).

> ⚠️ The versions iOS 2.0.0 and Android 3.0.0 contain a breaking change that removed the Facebook Keyframes library. We decided to go with a Lottie only library for the future, since it made the race for the best animation library. Also, the deprecated method `addViewToLayer` is now removed. Please continue to use `addViewToKeypathLayer`.
## Migrate from iOS < 2.0.0 and Android < 3.0.0

Instead of using `createLottieView`, simply use `createAnimationView` now. That's it!

## Requirements
- Titanium Mobile SDK 7.0.0 or later

- Axway Titanium SDK 7.0.0+

## Library versions:

The Titanium modules use external libraries

|Library|Platform|Version|Build Date|
|---|---|---|---|
| [Facebooks Keyframes](https://github.com/facebookincubator/Keyframes) | Android | 1.0.0 | 2017/02/11 |
| [Facebooks Keyframes](https://github.com/facebookincubator/Keyframes) | iOS | 1.0.0 | 2017/02/11 |
| [Airbnb Lottie](https://github.com/airbnb/lottie-android) | Android | 2.6.1 | 2018/09/06 |
| [Airbnb Lottie](https://github.com/airbnb/lottie-ios) | iOS | 2.5.0 | 2018/02/11 |
| [Airbnb Lottie](https://github.com/airbnb/lottie-ios) | iOS | 2.5.2 | 2018/12/10 |


## Choose your view
### Lottie
```js
var animation = TiAnimation.createLottieView({
file: 'file.json',
loop: false,
autoStart: false
});
```
### Keyframes
## Create a View

```js
var animation = TiAnimation.createKeyframeView({
var animation = TiAnimation.createAnimationView({
file: 'file.json',
loop: false,
autoStart: false
});
```

## Update native Libraries

- iOS: Use Carthage and `carthage update` to compile the framework automatically. Then, copy the output from `ios/Carthage/Build/iOS` to `ios/platform/`.
- Android: To be documented!

## Features/Documentation

Visit the [wiki](https://github.com/m1ga/ti.animation/wiki) for the documentation.

## Example

Please see the basic example in `example/app.js`. More examples can found in the [wiki](https://github.com/m1ga/ti.animation/wiki)

## Resources

At [LottieFiles](http://www.lottiefiles.com/) you will find a list of free Lottie animations.

Authors
---------------
## Authors

- Hans Knöchel ([@hansemannnn](https://twitter.com/hansemannnn) / [Web](http://hans-knoechel.de))
- Michael Gangolf ([@MichaelGangolf](https://twitter.com/MichaelGangolf) / [Web](http://migaweb.de))
1 change: 1 addition & 0 deletions ios/Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "airbnb/lottie-ios" "master"
14 changes: 0 additions & 14 deletions ios/Classes/Keyframes/TiAnimationKeyframeView.h

This file was deleted.

65 changes: 0 additions & 65 deletions ios/Classes/Keyframes/TiAnimationKeyframeView.m

This file was deleted.

48 changes: 0 additions & 48 deletions ios/Classes/Keyframes/TiAnimationKeyframeViewProxy.h

This file was deleted.

45 changes: 0 additions & 45 deletions ios/Classes/Keyframes/TiAnimationKeyframeViewProxy.m

This file was deleted.

30 changes: 0 additions & 30 deletions ios/Classes/Keyframes/keyframes-ios/Compatibility/Compatibility.h

This file was deleted.

This file was deleted.

Loading

0 comments on commit caf95d4

Please sign in to comment.