Git Product home page Git Product logo

lbtacomponents's Introduction

LBTAComponents

[![CI Status](http://img.shields.io/travis/Brian Voong/LBTAComponents.svg?style=flat)](https://travis-ci.org/Brian Voong/LBTAComponents) Version License Platform

LBTABanner

Description

LBTAComponents is a very simple library of components I use to build out production applications. The ultimate goal of open sourcing this chunk of code is to speed up the teaching and recording process for all the tutorials on my YouTube channel LetsBuildThatApp.

Why would you use this?

This project is continuously evolving, but as of right now the important components are:

  1. DatasourceController - Think of this as UICollectionViewController on steroids. No longer do we have to register cells with their own ids. Providing a simple subclass of Datasource will render out the list items.
  2. CachedImageView - Loading images and caching them is quite tedious, this is my basic implementation that I'm providing. For more on image caching, watch my tutorial.
  3. UIView anchors extension - Let's face it, the amount of code required to place views onto the screen isn't great. With this extension, you can anchor any view to any other view with just one line of code, albeit you need a few minutes to learn it.

Basic Example

Here's how easy it is to render a list

import LBTAComponents

class BasicController: DatasourceController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        let words = Datasource()
        words.objects = ["Hello", "How", "are", "you", "today", "?"]
        self.datasource = words
    }
    
}

BasicController

OK, so that's not a very interesting list you say. Providing some additional cell classes, you can easily modify your list to look like:

BasicHeaderCellFooterController

How to Run the Examples

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

This project requires Xcode 7+ running a target of iOS 9.1+ along with Cocoapods.

Installation

LBTAComponents is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "LBTAComponents"

Author

Brian Voong, [email protected]

License

LBTAComponents is available under the MIT license. See the LICENSE file for more info.

lbtacomponents's People

Contributors

bhlvoong avatar chrisortman avatar swifttsubame avatar

Watchers

 avatar James Cloos 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.