Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 615 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 615 Bytes

LGGIFKit

to general GIF and play GIF type file~

##preView demo

general GIF

        let filepath = NSBundle.mainBundle().pathForResource("video.mp4", ofType: nil)
        let videoPath = NSURL(fileURLWithPath: filepath!)
        LGGIFGeneral.generalGIFFromUrl(videoPath, loopCount: 0, FPS: 30) { (gifUrl) -> Void in
        // complection block
        }

play GIF

let gifView = LGGIFPlayer(frame: (self.view?.bounds)!, fileUrl: gifUrl)
            self.view.addSubview(gifView!)
            gifView?.startAnimation()