Hi, I'm Alex (short for Alexander).
- Blog: kean.blog
- Built Nuke, Pulse, and other popular frameworks and tools
- Developed the initial CreateAPI version which is now maintained by @cookpad
Contacts
- Mastodon: @[email protected]
Nuke Demo
Hi, I'm Alex (short for Alexander).
Contacts
How can i get the gif image height and width and set the table row height according to that.
override func awakeFromNib() {
super.awakeFromNib()
imageview = GIFImageView()
imageview.contentMode = .scaleAspectFit
imageview.clipsToBounds = true
spinner = UIActivityIndicatorView(style: .medium)
spinner.color = UIColor.gray
postimage.addSubview(imageview)
postimage.addSubview(spinner)
imageview.pinToSuperview()
spinner.centerInSuperview()
}
func setImage(with url: URL) {
let pipeline = ImagePipeline.shared
let request = ImageRequest(url: url)
if let image = pipeline.cache[request] {
return display(image)
}
spinner.startAnimating()
task = pipeline.loadImage(with: request) { [weak self] result in
self?.spinner.stopAnimating()
if case let .success(response) = result
{
self?.display(response.container)
self?.animateFadeIn()
}
}
}
private func display(_ container: Nuke.ImageContainer) {
if let data = container.data {
imageview.animate(withGIFData: data)
} else {
imageview.image = container.image
}
}
private func animateFadeIn() {
imageview.alpha = 0
UIView.animate(withDuration: 0.33) { self.imageview.alpha = 1 }
}
override func prepareForReuse() {
super.prepareForReuse()
task?.cancel()
spinner.stopAnimating()
imageview.image = nil
imageview.prepareForReuse()
}
What is the current status on .mp4 (H265 / VP9) support?
The demos are 9 months old saying "do not use in production".
On the official website, it states videos are supported.
On the github repository, there is no info at all about video support.
This is all very confusing....
The demo project doesn't compile when I clone it, I think this is the dealbreaker:
error project: Error while fetching remote repositoryhttps://github.com/kean/ScrollViewPrefetcher: The remote repository could not be accessed. Make sure a valid repository exists at the specified location and that the correct credentials have been supplied.
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.