https://github.com/cemolcay/imagesequance
Universal image sequance animation library for iOS, tvOS, macOS and watchOS.
https://github.com/cemolcay/imagesequance
image-animation image-sequance nsimageview uiimageview wkinterfaceimage
Last synced: about 1 year ago
JSON representation
Universal image sequance animation library for iOS, tvOS, macOS and watchOS.
- Host: GitHub
- URL: https://github.com/cemolcay/imagesequance
- Owner: cemolcay
- License: mit
- Created: 2017-04-08T21:00:27.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-09T01:34:13.000Z (about 9 years ago)
- Last Synced: 2025-04-06T10:53:23.820Z (about 1 year ago)
- Topics: image-animation, image-sequance, nsimageview, uiimageview, wkinterfaceimage
- Language: Ruby
- Size: 549 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ImageSequance
===
Universal image sequance animation library for iOS, tvOS, macOS and watchOS.
Requirements
----
* Swift 3+
* iOS 8.0+
* tvOS 9.0+
* watchOS 2.0+
* macOS 10.9+
Install
----
```
use_frameworks!
pod 'ImageSequance'
```
Usage
----
* Setup your images sequance naming.
For example if you have 10 images than your images should named like `frame-0` to `frame-9`.
* Create a sequance with naming and sequance range or directly image array.
* Call `play(sequance:)` function on `UIImageView`, `NSImageView` or `WKInterfaceImage`.
* Call `stopAnimating()` function to stop animation
* You could also set `repeatCount` property on sequance. Set 0 for infinite repeat.
* And `duration` property to control sequance duration.
```
let imageSequance = ImageSequance(
name: "frame-",
sequance: 0...9) // Int array or 0, 1, ..., 9 syntax will also work.
imageSequance.repeatCount = 0 // infinite repeat
imageView.play(sequance: imageSequance)
```