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

Convert NsNumber, NSDate to String in iOS Swift

store cgpoint in userdefaults iOS swift