Skip to content

Instantly share code, notes, and snippets.

View Wouter125's full-sized avatar
👻
Such mystery

Wouter Wouter125

👻
Such mystery
View GitHub Profile
if(activeCell.imageView.center.y < -110) {
//als de cell verder dan -110 is op de y as verwijderen we deze
} else if (activeCell.imageView.center.y >= -110 || activeCell.imageView.center.y <= 0) {
//Als de cell tussen -110 en 0 plaatsen we deze erboven
} else {
//Als dat in beide gevallen niet waar is, laten we hem terug vallen op de originele positie
}
@Wouter125
Wouter125 / detection.swift
Created August 10, 2016 16:23
Collectionview Cell detection
func buildCollectionView() {
let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout()
layout.scrollDirection = .horizontal
layout.minimumInteritemSpacing = 0;
layout.minimumLineSpacing = 4;
collectionView = UICollectionView(frame: CGRect(x: 0, y: screenSize.midY - 120, width: screenSize.width, height: 180), collectionViewLayout: layout)
collectionView.dataSource = self
collectionView.delegate = self