All Projects → LinkedInAttic → Layoutkit

LinkedInAttic / Layoutkit

Licence: apache-2.0
LayoutKit is a fast view layout library for iOS, macOS, and tvOS.

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to Layoutkit

The Endorser
An OSINT tool that allows you to draw out relationships between people on LinkedIn via endorsements/skills.
Stars: ✭ 269 (-91.53%)
Mutual labels:  linkedin
Nshipster.com
A journal of the overlooked bits in Objective-C, Swift, and Cocoa. Updated weekly.
Stars: ✭ 280 (-91.18%)
Mutual labels:  tvos
Attributedstring
基于Swift插值方式优雅的构建富文本, 支持点击长按事件, 支持不同类型过滤, 支持自定义视图等.
Stars: ✭ 294 (-90.74%)
Mutual labels:  tvos
Wikipediakit
Wikipedia API Client Framework for Swift on macOS, iOS, watchOS, and tvOS
Stars: ✭ 270 (-91.5%)
Mutual labels:  tvos
Linkedin To Json Resume
An exporter from a LinkedIn profile to JSON Résumé
Stars: ✭ 276 (-91.31%)
Mutual labels:  linkedin
Darklightning
Simply the fastest way to transmit data between iOS/tvOS and OSX
Stars: ✭ 286 (-90.99%)
Mutual labels:  tvos
Atvjs
Blazing fast Apple TV application development using pure JavaScript
Stars: ✭ 262 (-91.75%)
Mutual labels:  tvos
Entwine
Testing tools and utilities for Apple's Combine framework.
Stars: ✭ 306 (-90.37%)
Mutual labels:  tvos
Audioindicatorbars
AIB indicates for your app users which audio is playing. Just like the Podcasts app.
Stars: ✭ 279 (-91.22%)
Mutual labels:  tvos
Laravel Socialite
Social OAuth Authentication for Laravel 5. drivers: facebook, github, google, linkedin, weibo, qq, wechat and douban
Stars: ✭ 296 (-90.68%)
Mutual labels:  linkedin
Swiftui Charts
🚀 SwiftUI Charts with custom styles
Stars: ✭ 272 (-91.44%)
Mutual labels:  tvos
Infokit
Strongly Typed access to the Info.plist for iOS, macOS and tvOS.
Stars: ✭ 276 (-91.31%)
Mutual labels:  tvos
Manuallayout
✂ Easy to use and flexible library for manually laying out views and layers for iOS and tvOS. Supports AsyncDisplayKit.
Stars: ✭ 286 (-90.99%)
Mutual labels:  layout-engine
Datahub
The Metadata Platform for the Modern Data Stack
Stars: ✭ 4,232 (+33.25%)
Mutual labels:  linkedin
Web3.swift
A pure swift Ethereum Web3 library
Stars: ✭ 295 (-90.71%)
Mutual labels:  tvos
Xestimonitors
An extensible monitoring framework written in Swift
Stars: ✭ 269 (-91.53%)
Mutual labels:  tvos
Skeletonui
☠️ Elegant skeleton loading animation in SwiftUI and Combine
Stars: ✭ 275 (-91.34%)
Mutual labels:  tvos
Linkedin
Linkedin Scraper using Selenium Web Driver, Chromium headless, Docker and Scrapy
Stars: ✭ 309 (-90.27%)
Mutual labels:  linkedin
Functionkit
A framework for functional types and operations designed to fit naturally into Swift.
Stars: ✭ 302 (-90.49%)
Mutual labels:  tvos
Jgprogresshud
An elegant and simple progress HUD for iOS and tvOS, compatible with Swift and ObjC.
Stars: ✭ 3,110 (-2.08%)
Mutual labels:  tvos

🚨 UNMAINTAINED 🚨

This project is no longer used by LinkedIn and is currently unmaintained.

LayoutKit

CocoaPods GitHub release Build Status codecov

LayoutKit is a fast view layout library for iOS, macOS, and tvOS.

Motivation

LinkedIn created LayoutKit because we have found that Auto Layout is not performant enough for complicated view hierarchies in scrollable views. For more background, read the blog post.

Benefits

LayoutKit has many benefits over using Auto Layout:

  • Fast: LayoutKit is as fast as manual layout code and is significantly faster than Auto Layout.
  • Asynchronous: Layouts can be computed in a background thread so user interactions are not interrupted.
  • Declarative: Layouts are declared with immutable data structures. This makes layout code easier to develop, document, code review, test, debug, profile, and maintain.
  • Cacheable: Layout results are immutable data structures so they can be precomputed in the background and cached to increase user perceived performance.

LayoutKit also provides benefits that make it as easy to use as Auto Layout:

  • UIKit friendly: LayoutKit produces UIViews and also provides an adapter that makes it easy to use with UITableView and UICollectionView.
  • Internationalization: LayoutKit automatically adjusts view frames for right-to-left languages.
  • Swift: LayoutKit can be used in Swift applications and playgrounds.
  • Tested and production ready: LayoutKit is covered by unit tests and is being used inside of recent versions of the LinkedIn and LinkedIn Job Search iOS apps.
  • Open-source: Not a black box like Auto Layout.
  • Apache License (v2): Your lawyers will be happy that there are no patent shenanigans.

Hello world

let image = SizeLayout<UIImageView>(width: 50, height: 50, config: { imageView in
    imageView.image = UIImage(named: "earth.jpg")
})

let label = LabelLayout(text: "Hello World!", alignment: .center)

let stack = StackLayout(
    axis: .horizontal,
    spacing: 4,
    sublayouts: [image, label])

let insets = UIEdgeInsets(top: 4, left: 4, bottom: 4, right: 8)
let helloWorld = InsetLayout(insets: insets, sublayout: stack)
helloWorld.arrangement().makeViews(in: rootView)

Hello world example layout

Limitations

We have found LayoutKit to be a useful tool, but you should be aware of what it is not.

  • LayoutKit is not a constraint based layout system. If you wish to express a constraint between views, then those views need to be children of a single layout that implements code to enforce that constraint.
  • LayoutKit is not flexbox, but you may find similarities.

Installation

LayoutKit can be installed with CocoaPods or Carthage.

CocoaPods

Add this to your Podspec:

pod 'LayoutKit'

Then run pod install.

Carthage

Add this to your Cartfile:

github "linkedin/LayoutKit"

Then run carthage update.

Documentation

Now you are ready to start building UI.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].