Skip to content

Instantly share code, notes, and snippets.

View nickfl's full-sized avatar

Nick Floussov nickfl

View GitHub Profile
@OscarApeland
OscarApeland / Nibable.md
Last active September 22, 2018 08:42
Swift 4 - Nibable

Introduction

UIKits API for registering UINibs to UICollectionViews looks bad. Just look at this.

sizeCollectionView.register(UINib(nibName: "SearchFilterSizeCell", bundle: nil), forCellWithReuseIdentifier: "sizeCell")

Using them again is even worse;

let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "sizeCell", for: indexPath) as! SearchFilterSizeCell