cemolcay / ImageSequance

Universal image sequance animation library for iOS, tvOS, macOS and watchOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

About

Universal image sequance animation library for iOS, tvOS, macOS and watchOS.

License:MIT License


Languages

Language:Ruby 65.6%Language:Swift 29.6%Language:Objective-C 4.8%