GithubHelp home page GithubHelp logo

cheapcell's Introduction

CheapCell makes you force on view component without consider cell.

Contents

Requirements

  • iOS 13.0+
  • Xcode 11.0+
  • Swift 5.0+

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Installation

Swift Package Manager

Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

Xcode 11+ is required to build CheapCell using Swift Package Manager.

To integrate CheapCell into your Xcode project using Swift Package Manager, add it to the dependencies value of your Package.swift:

dependencies: [
    .package(url: "https://github.com/HParis/CheapCell", .branch("main"))
]

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate CheapCell into your project manually.


Usage

Quick Start

import CheapCell

class AView: UIView, CheapCell {

}

class BView: UIView, CheapCell {

}

class UICollectioViewExample { 

    // Register cheap cell 
    collectionView.registerCheapCell(AView.self)
    collectionView.registerCheapCell(BView.self)

    // Reuse cheep cell
    let cell = collectionView.dequeueReusableCheapCell(for: indexPath) as CollectionCell<AView>
    let cell = collectionView.dequeueReusableCheapCell(for: indexPath) as CollectionCell<BView>
    
}

class UITableViewExample {
    // Register cheap cell 
    tableView.registerCheapCell(AView.self)
    tableView.registerCheapCell(BView.self)

    // Reuse cheep cell
    let cell = tableView.dequeueReusableCheapCell(for: indexPath) as TableCell<AView>
    let cell = tableView.dequeueReusableCheapCell(for: indexPath) as TableCell<BView>
}

License

CheapCell is released under the MIT license. See LICENSE for details.

cheapcell's People

Contributors

hparis avatar

Stargazers

 avatar

Watchers

 avatar

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.