R – How are touches handled by a UITableView

cocoa-touchiphoneuiscrollviewuitableview

I'm trying to better understand how UITableView and UITableViewCell work, and one part of that is touch handling.

So when I touch a row on a table view, what exactly happens? My basic understanding is:

  1. UITableView is a UIScrollView, so first it checks if it's a touch or a scroll
  2. If it's not a scroll then the touch gets analyzed to see which row is under the touchpoint
  3. It gets the cell at this indexPath (how?) and tells it to setHighLighted, setSeletected

Is that it? Does anybody have a more thorough understanding of it than that?

Best Solution

Probably somethign along the lines you mentioned, you never know though until you see t he source, why do you want to know anyway? you making your own tableview?