iphone - UITableView Multiple Selection -


How can I add a UITableView to my visual-based application where the user will tap on more than one cell, and this clock The app's "new alarm" setting is properly selected like "recurrence" (clock> alarm> +> repeat), and how do I get all the selected cells in an array?

In the implementation of -tableView: didSelectRowAtIndexPath: You see the table of the cell < Code> Assistant type property based on its current value (so that it can toggle off and off with multiple tap) For example:

  - (zero) table view : (UITableView *) table view was SelectionRowAtIndexPath: (NSIndexPath *) path {UITableViewCell * cell = [tableView cellForRowAtIndexPath: path]; If (cell.accessoryType == UITableViewCellAccessoryCheckmark) {cell. Accessory type = UITableViewCellAccessoryNone; } And {cell. Accessory type = UITableViewCellAccessoryCheckmark; }}  

You can either maintain an array of selected states in addition to the status of your secondary type of cells or state of each one to iterate cells in table sequences Read the selected rows to inquire.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -