Coder Social home page Coder Social logo

preheat's Introduction

preheat's People

Contributors

ejensen avatar kean avatar sammy-sc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

preheat's Issues

README is outdated

It's not swift 3 or the latest version. I'll see if I can get around to it.

Manual Installation

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.

Could not cast value of type 'FlexiCollectionViewLayout.FlexiCollectionViewLayout' to 'UICollectionViewFlowLayout'

Привет. Я не силен в 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

What is "PreheatControllerDelegate"?

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?

Fast scrolling in PreheaterController showing no images even images already downloaded

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.

How to use Preheat with swift 2.3

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

Using Preheat

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.