When you work with an atypical nested UITableViews setting - where you have an external vertical UITableView that has 90 Β° UITableViews (see Looking for a user interface library to present Data horizontaly in iOS ): is there a way to make the iOS process vertical and horizontal touch at the same time?
I found that iOS is very smart at handling: horizontal touches make the UITableView scroll horizontally, while a vertical swipe makes an external UITableView scroll. Perfect.
Only, I would like to move my finger diagonally and see the external UITableView and scroll the internal UITableView at the same time.
I tried several approaches (playing with canCancelContentTouches, delayaysContentTouches and sensory messages), but I did not find a way to do this.
EDIT: Here's an Xcode4 project that shows this behavior: http://marcanton.io/other/stackoverflow/nestedtableviews.zip
EDIT: I sent this question to Apple Developer Technical Support, here is their answer:
Thank you for writing to Apple Worldwide Developer Support. I am responding to your request regarding touch events in inline UITableViews.
This is usually an approach that is not recommended. The problem is that the UITableView inherits from UIScrollView and as stated in the documentation for UIScrollView:
"Important: you must not embed a UIWebView or UITableView in UIScrollView Objects. If you do so, this may lead to unexpected behavior of the touch event for two objects may be mixed and erroneously processed."
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIScrollView_Class/Reference/UIScrollView.html%23//apple_ref/occ/cl/UIScrollView
So, this time there is no workaround to scroll at the same time.
I recommend you request an improvement at http://developer.apple.com/bugreporter/ detailing what you would like to see we add in a future release.
However, I think there should be a way to enable this functionality, although I understand that this is not recommended. In fact, Apple does not even recommend placing UITableViews inside another UITableView, but with the exception made above, it works pretty nicely. I will keep this issue up to date with our collective finds.
EDIT: Actually there is a method described in detail here: http://marcanton.io/blog/nested-orthogonal-tableviews/