Giter Club home page Giter Club logo

colourloveswift's Introduction

ColourLoveSwift

(A Swift equivalent of ColourLove)

This project only purpose is to provide brief, clean and readable code in a dummy application. It is heavily library based and MVC oriented and shows mecanisms like downloading, storing and displaying data from a webservice. Local data is handled with the Realm library.

You are of course invited to use, fork and improve this project using your own knowledge. I'll try to update the code with up to date libraries and conventions.

Philosophy

KISS : Kepp It Simple Stupid

Classes

  • ViewControllers are suffixed by 'VC'
  • Models should be self-explanatory and match the server model (if possible)
  • Custom views should indicate the superclass type (like ColorCell which extends UITableViewCell)

How to install

Dependencies are managed via CocoaPods

git clone [email protected]:kirualex/ColourLoveSwift.git
cd ColourLoveSwift
gem install cocoapods
pod setup
pod install
open ColourLoveSwift.xcworkspace

Swiftgen

Using Swiftgen, we automatically generate safe code for storyboards, images, localizable and colors. Here is the script used just before the "Compile Sources" phase to achieve this.

if hash swiftgen 2>/dev/null; then
swiftgen strings --output "${SRCROOT}/ColourLoveSwift/Swiftgen/L10n.swift" "${SRCROOT}/ColourLoveSwift/Resources/Strings/Base.lproj/Localizable.strings"
swiftgen images --output "${SRCROOT}/ColourLoveSwift/Swiftgen/UIImage+Assets.swift" "${SRCROOT}/ColourLoveSwift/Resources/"
swiftgen storyboards --output "${SRCROOT}/ColourLoveSwift/Swiftgen/UIStoryboard+Gen.swift" "${SRCROOT}/ColourLoveSwift/Resources/Storyboards/"
swiftgen colors --output "${SRCROOT}/ColourLoveSwift/Swiftgen/UIColor+Gen.swift" "${SRCROOT}/ColourLoveSwift/Resources/colors.txt"
else
echo "Swiftgen does not exist, download from https://github.com/AliSoftware/SwiftGen"
fi

Swiftlint

Swiftlint is a great way to ensure the codebase stay clean and hopefully readable. You can tweak the rules in the .swiftlint.yml file

Screenshots

screenshots

colourloveswift's People

Contributors

alexiscreuzot avatar

Watchers

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