Gifu/Demo/demo/classes/ViewController.swift
Reda Lemeden e14b53193f Add Swift 2.0 support
One step closer to 1.0. Changes include:

- Refactor the API
- Make image source non-optional
- Use submodule for Runes dependency
- Add specs
- Remove Runes framework dependency
2015-10-22 19:14:35 +02:00

22 lines
419 B
Swift
Executable File

import UIKit
import Gifu
class ViewController: UIViewController {
@IBOutlet weak var imageView: AnimatableImageView!
override func viewDidLoad() {
super.viewDidLoad()
imageView.animateWithImage(named: "mugen.gif")
}
@IBAction func toggleAnimation(sender: AnyObject) {
if imageView.isAnimatingGIF {
imageView.stopAnimatingGIF()
} else {
imageView.startAnimatingGIF()
}
}
}