Last active
March 12, 2018 20:04
-
-
Save pallavtrivedi03/7c30c15be5635081d9ea5100fd2cbe2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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