Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extension UITableView {
- func reusableCell(style: UITableViewCellStyle, reuseIdentifier: String, configureBlock: ((UITableViewCell) -> Void)? = nil) -> UITableViewCell {
- if let cell = dequeueReusableCell(withIdentifier: reuseIdentifier) {
- configureBlock?(cell)
- return cell
- }
- return UITableViewCell(style: style, reuseIdentifier: reuseIdentifier)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement