Get Updates By E-mail 

Article Written By:
Johann Dowa

LayoutKit – Swift Library Providing A Higher-Performance Auto Layout Alternative

  •  
  •  
  •  
  •  
  •  

LayoutKit is an open source interface layout library from LinkedIn that was created to provide increased performance over the iOS SDK’s auto layout for complex layouts in scrollable views.

LayoutKit is as fast as manually laying out code, and considerably faster than auto layout, provides caching for increased performance, and layouts can be created within background threads.

LayoutKit syntax is clean, and similar to flexbox – here is a code snippet from the readme:

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, layout: stack)
helloWorld.arrangement().makeViews(inView: rootView)

You can find LayoutKit on Github here.

A nice high performance view layout library.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments