Git Product home page Git Product logo

uilayoutkit's Introduction

UILayoutKit

Draw view easy with visual

Intallation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'UISwiftLayoutKit'

How to use

view.visual.anchor(...)
view.visual.size(...)
view.visual.format(...)
view.visual.center(...)
view.visual.equal(...)
view.visual.stack(...)
view.visual.square(...)

Example 1:

      self.view.visual.anchor([.top, .horizontal], for: view1, padding: 0)
      self.view.visual.size([.height], for: view1, constant: 80)
      self.view.visual.anchor([.bottom, .horizontal], for: view2, padding: 0)
      self.view.visual.size([.height], for: view2, constant: 50)
      self.view.visual.anchor([.horizontal, .vertical], for: view0, padding: 100)

Example 2:

      self.view.visual.format("H:|-0-[v0]-0-[v1]-0-[v2]-0-|", for: [view0, view1, view2])
      self.view.visual.anchor([.vertical], for: view0, padding: 0)
      self.view.visual.anchor([.vertical], for: view1, padding: 0)
      self.view.visual.anchor([.vertical], for: view2, padding: 0)
      self.view.visual.equal(.width, views: [view0, view1, view2])

Example 3:

        self.view.visual.stack(.horizontal, for: [view0, view1, view2], spacing: 16)
        self.view.visual.anchor([.vertical], for: view0, padding: 0)
        self.view.visual.anchor([.vertical], for: view1, padding: 0)
        self.view.visual.anchor([.vertical], for: view2, padding: 0)
        self.view.visual.equal(.width, views: [view0, view1, view2])

Example 4:

        self.view.visual.stack(.vertical, for: [view0, view1, view2], spacing: 0)
        self.view.visual.anchor([.horizontal], for: view0, padding: 0)
        self.view.visual.anchor([.horizontal], for: view1, padding: 0)
        self.view.visual.anchor([.horizontal], for: view2, padding: 0)
        self.view.visual.equal(.height, views: [view0, view1, view2])

Example 5:

        self.view.visual.stack(.vertical, for: [view0, view1, view2], spacing: 0)
        self.view.visual.anchor([.horizontal], for: view0, padding: 0)
        self.view.visual.anchor([.horizontal], for: view1, padding: 0)
        self.view.visual.anchor([.horizontal], for: view2, padding: 0)
        self.view.visual.size([.width], for: view0, constant: 64)
        self.view.visual.size([.width], for: view2, constant: 50)

Contact

uilayoutkit's People

Contributors

caophuocthanh avatar

Stargazers

 avatar

Watchers

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