Skip to content

Instantly share code, notes, and snippets.

@stfalconaleks
Created October 20, 2017 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stfalconaleks/a5186f31c25b8181ba40cd5f7a523ad8 to your computer and use it in GitHub Desktop.
Save stfalconaleks/a5186f31c25b8181ba40cd5f7a523ad8 to your computer and use it in GitHub Desktop.
private func setupConstraints() {
self.backImView.translatesAutoresizingMaskIntoConstraints = false
self.textLbl.translatesAutoresizingMaskIntoConstraints = false
self.titleLbl.translatesAutoresizingMaskIntoConstraints = false
self.imageView?.translatesAutoresizingMaskIntoConstraints = false
self.button?.translatesAutoresizingMaskIntoConstraints = false
self.customView?.translatesAutoresizingMaskIntoConstraints = false
let backImLeading = NSLayoutConstraint(item: self.backImView,
attribute: .Leading,
relatedBy: .Equal,
toItem: self,
attribute: .Leading,
multiplier: 1.0,
constant: 15.0)
let backImTop = NSLayoutConstraint(item: self.backImView,
attribute: .Top,
relatedBy: .Equal,
toItem: self,
attribute: .TopMargin,
multiplier: 1.0,
constant: 20.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment