Swift implementation of YLGIFImage.
liyong03 / ylgifimage-swift Goto Github PK
View Code? Open in Web Editor NEWSwift implementation of YLGIFImage
License: MIT License
Swift implementation of YLGIFImage
License: MIT License
Swift implementation of YLGIFImage.
Hi and thank you so much for the amazing work you've done developing this project.
I've encountered a bug that I'm not sure how to resolve.
I'm hitting the line let imgCount = CGImageSourceGetCount(cgImageSource)
inside private class func isCGImageSourceContainAnimatedGIF(cgImageSource: CGImageSource!) -> Bool
and I'm encountering an error that crashes my app.
warning: could not load any Objective-C class information. This will significantly reduce the quality of type information available.
By using print(cgImageSource)
I can see an infinite list of different memory locations printed out until the crash occurs. Short example:
cgImageSource : <CGImageSource 0x145bac450 [0x1a0493150]> cgImageSource : <CGImageSource 0x145cd1630 [0x1a0493150]> cgImageSource : <CGImageSource 0x145bb4c80 [0x1a0493150]> cgImageSource : <CGImageSource 0x145ce0440 [0x1a0493150]> cgImageSource : <CGImageSource 0x145bb2150 [0x1a0493150]> cgImageSource : <CGImageSource 0x145ce0610 [0x1a0493150]>
Any guidance would be greatly appreciated.
I'm trying to compile your demo project but I get tons of error, any chance you will be updating your code? Would really appreciate it!
Any intentions to update to swift3?
Animation is too slow in iPad-3. device version is iOS-8-beta-2. Also Xcode shows CPU usage as 100 % while playing Gif. Did you check with device?
Hi,
Just've found a issue with memory leak after exit segue in View Controller with YLGIFImageView. Image cached data remains and creates new allocation with every segue to the View Controler.
My solution
In YLGIFImage.swift:
func clearData() {
frameImages.removeAll()
_cgImgSource = nil
}
In YLImageView.swift:
func clearImages() {
self.animatedImage?.clearData()
self.currentFrame = nil
self.image = nil
}
and then I can release memory with:
nameOfYLImageView.clearImages()
Support Swift3???
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.