Zoetrope
Requirements
- Swift 4.2
- iOS 8.0+
- Xcode 9+
Usage
To run the example project, clone the repo, and run pod install
from the Example directory first.
To use Zoetrope in your own project you use the UIImage
and UIImageView
extensions exposed by the library:
import Zoetrope
func viewDidLoad() {
super.viewDidLoad()
// This method auto-loads the image from the main bundle. If you need more control
// or are downloading images over the air you can also use the Data initialiser:
// UIImage(gifData: myData)
guard let image = UIImage(gifName: "animated.gif") else {
return
}
imageView.displayGif(image)
}
Here's an animated gif of the simulator displaying an animated gif.
Installation
Zoetrope is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Zoetrope"
And Carthage. Add the following to your Cartfile
and then run carthage update
:
github "JanGorman/Zoetrope"
Author
License
Zoetrope is available under the MIT license. See the LICENSE file for more info.