Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.42 KB | None | 0 0
  1.         if groupItems.count > 0 {
  2.             let first = groupItems[0]
  3.             let contentWidthConstraints = NSLayoutConstraint(item: scrollContentView, attribute: .width,
  4.                 relatedBy: .equal,  toItem: first, attribute: .width, multiplier: CGFloat(groupItems.count),
  5.                 constant: groupItemPadding * (CGFloat(groupItems.count * 2)))
  6.             scrollContentView.addConstraint(contentWidthConstraints)
  7.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement