Swift snippet #2 โ Generic UITableView dequeue cell
Published in
1 min readNov 29, 2016
Tuesday, 29th November, 2016
This generic method will allow you to get custom cellโs reference without force casting! Generics allows the function to infer cellโs type which goes something like this ๐..
let cell: CustomCell = table.dequeueCell(
withIdentifier: identifier,
for: indexPath
)
If you are wondering about the inception of Swift-Snippets or want to checkout more such snippets then you can find them here ๐