You can enable a multi-select option in table view.
tableView.allowsMultipleSelectionDuringEditing = true
This allows you to select multiple rows with a checkbox.
Post
Replies
Boosts
Views
Activity
When you know how many times you need to run some code then FOR loop is best.
For example, array-dictionary traversal
Whereas, WHILE loop is best when you don't know how many times some code will run.
For example, in a LinkedList traversal, we don't know how many nodes are there in the linked list. We will go through each node until it becomes nil.
Note: In many cases, you can use them vice-versa.