Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Selection Dos and Don'ts

There are a few of things to bear in mind when configuring row selection:

  • Don't use selection to indicate the state of the row's object. Selection works at the view level of the MVC hierarchy, so it's independent of the model.
  • Unless multiple selections are allowed, always programmatically deselect the previously selected row before a new row is selected.
  • If the response to the row selection is to push a new view onto the display (for example, if you have a navigation controller that pushes on a detail view), always programmatically deselect the previous rows after the detail view is dismissed. This will ensure that the rows aren't still highlighted after the detail view is popped off the view stack, but provides a visual cue as to which row the detail view referred to.

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial