FrameLayoutKit 6.5.4

FrameLayoutKit 6.5.4

Maintained by Nam Kennic.


Platform Language Version SwiftPM Compatible License


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

For Objective-C version: NKFrameLayoutKit (Deprecated, not recommended)


Say NO to autolayout constraint nightmare:


FrameLayoutKit supports complex layouts, including chaining and nesting layout with simple and intuitive operand syntax.


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


FrameLayoutKit is available through Swift Package Manager (Recommended) and CocoaPods:

Regardless, make sure to import the project wherever you may use it:

import FrameLayoutKit


FrameLayoutKit can be installed as a CocoaPod. To install, include this in your Podfile.

pod "FrameLayoutKit"

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into Xcode and the Swift compiler. This is the recommended installation method. Updates to FrameLayoutKit will always be available immediately to projects with SPM. SPM is also integrated directly with Xcode.

If you are using Xcode 11 or later:

  1. Click File
  2. Add Packages...
  3. Specify the git URL for FrameLayoutKit.


This is how FrameLayoutKit layout the card view below:

let frameLayout = StackFrameLayout(axis: .horizontal)
frameLayout + VStackLayout {
   ($0 + earthImageView).alignment = (.top, .center)
   ($0 + 0).flexible() // add a flexible space
   ($0 + rocketImageView).alignment = (.center, .center)
frameLayout + VStackLayout {
   $0 + [nameLabel, dateLabel] // add an array of views
   $0 + 10 // add space with 10 px fixed
   $0 + messageLabel // add a single view
   $0.spacing = 5.0 // spacing between views

   .padding(top: 15, left: 15, bottom: 15, right: 15)

Hello World


FrameLayoutKit is one of the fastest layout libraries. Benchmark Results

See: Layout libraries benchmark's project


  • Swift Package Manager
  • CocoaPods support
  • Objective-C version (Deprecated - Not recommended)
  • Swift version
  • Examples
  • Documents


Nam Kennic, [email protected]


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