ios - Move a view when scrolling in UITableView -


i have uiview uitableview below it:

enter image description here

what have view above uitableview move (out of way) when user starts scrolling in table in order have more space uitableview (and come down when scroll down again).

i know done table header view, problem table view inside tab (actually side-scrolling page view implemented using ttsliddingpageviewcontroller). while have 1 top uiview there 3 uitableviews.

is possible accomplish manually? first thought put in uiscrollview, according apple's documentation 1 should never place uitableview inside uiscrollview leads unpredictable behavior.

since uitableview subclass of uiscrollview, table view's delegate can receive uiscrollviewdelegate methods.

in table view's delegate:

- (void)scrollviewdidscroll:(uiscrollview *)scrollview {     static cgfloat previousoffset;     cgrect rect = self.view.frame;     rect.origin.y += previousoffset - scrollview.contentoffset.y;     previousoffset = scrollview.contentoffset.y;     self.view.frame = rect; } 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -