With the following code you can disable selection for a single cell: lectionStyle = UITableViewCell.SelectionStyle. If you only want to disable the selection of some of the UITableViewCells in your UITableView you can define this for each cell in the tableView function with the cellForRowAt parameter. This will look like this: override func viewDidLoad() Disable selection for specific UITableViewCells You have to set the following code in for example the ViewDidLoad function of your ViewController: tableView.allowsSelection = false When a cell (or color) is tapped, the selected text changes its color from black to the selected color. This popover is a TableViewController that contains some colors. The process consists in a popover that is displayed from a UIMenuItem in a text selection on a textView. To disable selection for all UITableViewCells in your UITableView. Im trying to implement the delegation pattern on Swift. Disable selection for specific UITableViewCells.ĭisable selection for all UITableViewCells in the UITableView.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |