Advertisement
Guest User

Untitled

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