Latest 3.3
Homepage https://github.com/kennic/FrameLayoutKit
License MIT
Platforms tvos 9.0, ios 8.0
Authors

FrameLayoutKit

CI Status
Version
License
Platform

FrameLayout is a super fast and easy to use layout library for iOS and tvOS.

For Objective-C version: NKFrameLayoutKit

Example

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

Installation

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

pod "FrameLayoutKit"

Hello world

let image = UIImage(named: "earth.jpg")

let label1 = createLabel(text: "Hello World 1", backgroundColor: .red)
let label2 = createLabel(text: "Hello World 2", backgroundColor: .green)
let label3 = createLabel(text: "Hello World 3", backgroundColor: .blue)
let label4 = createLabel(text: "Hello World 4", backgroundColor: .black)
let label5 = createLabel(text: "Hello World 5", backgroundColor: .purple)

let label4_5 = DoubleFrameLayout(direction: .vertical, alignment: .top, views: [label4, label5])
label4_5.spacing = 5

let label3_4_5 = DoubleFrameLayout(direction: .horizontal, alignment: .left, views: [label3, label4_5])
label3_4_5.spacing = 5

frameLayout = StackFrameLayout(direction: .vertical, alignment: .top)
frameLayout.append(view: label1)
frameLayout.append(view: label2)
frameLayout.append(view: imageView).contentAlignment = (.center, .center)
frameLayout.append(frameLayout: label3_4_5)
frameLayout.edgeInsets = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5)
frameLayout.showFrameDebug = true
frameLayout.spacing = 5

Hello World

Benchmark

FrameLayoutKit is one of the fastest layout libraries.
Benchmark Results

See: Layout libraries benchmark’s project

Todo

  • [x] CocoaPods support
  • [x] Objective-C version
  • [x] Swift version
  • [ ] Examples
  • [ ] Documents

Author

Nam Kennic, [email protected]

License

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

Latest podspec

{
    "name": "FrameLayoutKit",
    "version": "3.3",
    "summary": "FrameLayoutKit is a super fast and easy to use layout kit",
    "description": "An auto layout kit helps you to layout your UI easier and more effective",
    "homepage": "https://github.com/kennic/FrameLayoutKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Nam Kennic": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kennic/FrameLayoutKit.git",
        "tag": "3.3"
    },
    "social_media_url": "https://twitter.com/namkennic",
    "platforms": {
        "tvos": "9.0",
        "ios": "8.0"
    },
    "swift_version": "4.2",
    "source_files": "FrameLayoutKit/Classes/*.*"
}

Pin It on Pinterest

Share This