How can I disable the UITableView selection?

All you have to do is set the selection style on the UITableViewCell instance using either: Objective-C: cell.selectionStyle = UITableViewCellSelectionStyleNone; or [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; Swift 2: cell.selectionStyle = UITableViewCellSelectionStyle.None Swift 3 and 4.x: cell.selectionStyle = .none Further, make sure you either don’t implement -tableView:didSelectRowAtIndexPath: in your table view delegate or explicitly exclude the cells you want … Read more

Using Auto Layout in UITableView for dynamic cell layouts & variable row heights

TL;DR: Don’t like reading? Jump straight to the sample projects on GitHub: iOS 8 Sample Project – Requires iOS 8 iOS 7 Sample Project – Works on iOS 7+ Conceptual Description The first 2 steps below are applicable regardless of which iOS versions you are developing for. 1. Set Up & Add Constraints In your … Read more

tech