Easily convert a video to a GIF on iOS.
Regift is available through CocoaPods, and requires Swift 2. To install it, simply add the following line to your Podfile:
pod "Regift"
import Regift
let videoURL = ...
let frameCount = 16
let delayTime = 0.2
let loopCount = 0 // 0 means loop forever
let regift = Regift(sourceFileURL: videoURL, frameCount: frameCount, delayTime, loopCount: loopCount)
print("Gif saved to \(regift.createGif())")
Thanks to Rob Mayoff's Gist, without which this library wouldn't exist.