I\'m working on an iPhone application where I want to drag the table view (not the cells) upto a certain point in the screen. I have the tableview sitting in the bottom half
I think the way you're doing it is fine. You just need to stop the UIGestureRecognizer from handling any more touches after a certain point. So what I would do (with the least amount of change to your existing code) is just override the delegate function:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
In that function, analyze the position of the table view and if the table view has reached a certain height already, return NO. This will stop the UIPanGestureRecognizer from accepting the touch event and pass it up the chain, which should go straight to the UIScrollView of the table view.
Alternative, if I had the time to figure this out, I would try to accomplish this with the image as the table's header (self.tableView.tableHeaderView). This way all of the scrolling is done within the the scrollview of the table and the table's frame doesn't have to move. If you wanted to add some cool effects to the tableHeaderView, you could always override the UIScrollViewDelegate function - (void)scrollViewDidScroll:(UIScrollView *)scrollView
and slightly shift the image in the header as the table scrolls up the initial half screen (this is the same effect that Path does). However, this wouldn't allow you to peg the image at the very top of the table view... the entire image would scroll away. Just my 2 cents. :)