How to get the selected row or selected cells in UITableView iOS swift

solution:

You can get the selected rows or selected cells by using the below code.It will return the array of indexPath.You can get and set it by using the arrays.

For selected Rows:

let selected = tableView.indexPathsForSelectedRows


For selected Sections:

let selected = tableView.indexPathsForSelectedSections

Comments

Popular posts from this blog

How to blink a button iOS swift?

iOS flutter while run to iPhone it had the error - Cannot find type 'PhoneNumberKit' in scope