SnapKitten — Swift library for linear layout

let userProfile : UIView = 
let userProfile : UIView = Kitten.horizontal().from().defaultAlignment(.start)
userProfile.backgroundColor = UIColor.orangelet bottomMenu =
let scrollView = UIScrollView()Kitten.create(.vertical).from(viewController).isAlignDirectionEnd(true).add(userProfile).alignSideStart()
pod "SnapKitten"
import UIKit
import SnapKitten
import PlaygroundSupport

let virtualView = UIView(frame: CGRect(x: 0, y: 0, width: 320, height: 100))
virtualView.backgroundColor = UIColor.gray
PlaygroundPage.current.liveView = virtualView

let iv = UIImageView()
iv.backgroundColor =
let lblA = UILabel()
lblA.text = "Hello World"
lblA.backgroundColor =

let simpleComponent = Kitten.horizontal().from()
simpleComponent.backgroundColor =

//some java code example
Kitten.create(KittenOrientation.vertical) .from(mainView).isAlignDirectionEnd(true) .add(temp).align(KittenAlignment.parent) .add(imageView)

Thank you for your reading!




Team lead of enterprise company, focus on mobile native and react native

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium


Considerazioni sullo staking OHM prima della migrazione

Building Lambda Layers by Cheating (a bit)

How to Claim your Aurora Reward from S

There is not a lot of information about the beginnings of Tinder, its fundraising-round history, or

Data Ingestion using Pandas

Online Stock Span

BlackBox Development Update

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
spring wong

spring wong

Team lead of enterprise company, focus on mobile native and react native

More from Medium

How To Implement A ZStack in UIKit using AutoLayout

A ZStack built with UIKit

Face ID & Touch ID — Customized cancel button title and fallback button title in Swift, iOS

Change app icon dynamically

Preventing Invalid Characters from Being Entered in a UITextField