Skip to content

Instantly share code, notes, and snippets.

@pallavtrivedi03
Last active March 12, 2018 20:04
Show Gist options
  • Save pallavtrivedi03/7c30c15be5635081d9ea5100fd2cbe2e to your computer and use it in GitHub Desktop.
Save pallavtrivedi03/7c30c15be5635081d9ea5100fd2cbe2e to your computer and use it in GitHub Desktop.
override func viewDidLoad() {
super.viewDidLoad()
dragDropAreaView.delegate = self
setupView()
}
override func viewDidAppear() {
let flowLayout = NSCollectionViewFlowLayout()
flowLayout.itemSize = NSSize(width: 160.0, height: 120.0)
flowLayout.sectionInset = EdgeInsets(top: 10.0, left: 20.0, bottom: 10.0, right: 20.0)
flowLayout.minimumInteritemSpacing = 20.0
flowLayout.minimumLineSpacing = 20.0
collectionView.collectionViewLayout = flowLayout
view.wantsLayer = true
collectionView.layer?.backgroundColor = #colorLiteral(red: 0.9215686275, green: 0.9215686275, blue: 0.9215686275, alpha: 1)
collectionView.frame = dragDropAreaView.frame
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment