Skip to content

About

Porting UILayoutGuide to iOS 8+

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

KLLayoutGuide

Porting UILayoutGuide to iOS 8+

What is UILayoutGuide🤔

A rectangular area that can interact with Auto Layout.

let space1 = UILayoutGuide()
view.addLayoutGuide(space1)

let space2 = UILayoutGuide()
view.addLayoutGuide(space2)

space1.widthAnchor.constraintEqualToAnchor(space2.widthAnchor).active = true
saveButton.trailingAnchor.constraintEqualToAnchor(space1.leadingAnchor).active = true
cancelButton.leadingAnchor.constraintEqualToAnchor(space1.trailingAnchor).active = true
cancelButton.trailingAnchor.constraintEqualToAnchor(space2.leadingAnchor).active = true
clearButton.leadingAnchor.constraintEqualToAnchor(space2.trailingAnchor).active = true

For detail see the documentation

How to use on iOS 8?

pod 'KLLayoutGuide'

then just use UILayoutGuide

About

Porting UILayoutGuide to iOS 8+

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages