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]
Automates prefetching of content in UITableView and UICollectionView
License: MIT License
Hi, I'm Alex (short for Alexander).
Contacts
It's not swift 3 or the latest version. I'll see if I can get around to it.
CocoaPods
and Carthage
are awesome tools and make our life really easier, but there are some devs who still don't know how to use them.
It would be cool to add the Manual installation guide in your README.md
. You can take a look at my iOS Readme Template to see how you can do it.
Привет. Я не силен в swift, только начинаю его изучать, прошу помочь.
Я использую кастомный layout (FlexiCollectionViewLayout)
Как следствие, приложение падает при попытке cast типов
Could not cast value of type 'FlexiCollectionViewLayout.FlexiCollectionViewLayout' (0x103ffe070) to 'UICollectionViewFlowLayout' (0x1055a2a48).
Падает вот в этом месте
extension UICollectionView: Preheated {
public var orientation: ScrollOrientation {
switch (collectionViewLayout as! UICollectionViewFlowLayout).scrollDirection {
case .vertical: return .vertical
case .horizontal: return .horizontal
}
}
Падает потому, что я использую FlexiCollectionViewLayout, тогда как Preheared желает получить layout как UICollectionViewFlowLayout
Смысл проблемы понятен, но как исправить, я не понимаю, очень прошу помочь.
Вот кусок кода загрузки контроллера...
override func viewDidLoad() {
super.viewDidLoad()
preheater = Preheater()
preheatController = Preheat.Controller(view: self.collectionView!)
preheatController.handler = { [weak self] addedIndexPaths, removedIndexPaths in
self?.preheat(added: addedIndexPaths, removed: removedIndexPaths)
}
let layout = FlexiCollectionViewLayout()
collectionView?.collectionViewLayout = layout
I saw in your example, there is a PreheatControllerDelegate
.
After I installed Preheat
, cleaned and build, the compiler shows PreheatControllerDelegate
is undeclared. (I have import Preheat
)
And I can't find the documentation about it, what is it and how to fix this?
Hi kean i am using UITableView as PreheaterController, and nuke to download images. Images are approximately 2 MB each. Issue is that after downloading all images if i am scrolling little bit fast (more then normal scrolling by a user) image view not showing respected image. Its working great on normal scrolling. Is it due to preheat method which call nuke to stopPreheatingImages ?
Thanks.
Hello kean thanks for this great library i tested it on swift 3.0 and it is great library great experience.
But i have to integrate this with my project written in swift 2.3 and i tried a lot but failed. Is it possible to use this with swift 2.3?
Thanks
Hi Alexander,
I'm interested in using Preheat for my project to load very deep view structures before I need them. I was looking at the code a bit, my hesitation is that Preheat may not be tool I'm looking for. Can you speak to its performance for doing that kind of preloading rather than just purely images?
Thanks!
Zack
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.