Skip to content

iOS constraint maker you always wanted. Write constraints like sentences in English. Simple. Intuitive. No frightening abstractions. One file.

License

Notifications You must be signed in to change notification settings

KeepCalmAndPush/YeahLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

YeahLayout

iOS constraint maker you always wanted. Write constraints like sentences in English.
Simple. Intuitive. No frightening abstractions. One file.

  • You want your view's height to be equal to width of another view? Here you go: view.make(.height, .equal, to: .width, of: otherView)
  • Or some view's width to be 100? Even simpler: someView.make(.width, .equal, 100)
  • Place a view an under upper view? You are welcome: someView.place(under: upperView, +20)
  • Manage several layout attributes at once, set multipliers and insets? Also possible: view.make([.leading, .trailing], .equal, as: [0.5, 0.8], of: otherView, [20, -20])
  • Set your constraint's priority? There is a ^ operator: view.make(.height, .equal, 44) ^ 750

Every make method and ^ operator returns you one (or more) NSLayoutConstraints you can store for later use.

About

iOS constraint maker you always wanted. Write constraints like sentences in English. Simple. Intuitive. No frightening abstractions. One file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages