If I understand it correctly, you want to make
the pulling action by a user triggering albe to trigger two different method call depends on how much the user pull.
I assume the the UiView that u want to add to be "2nd Header".
It should be something similar to "pull to refresh header".
I think the magic is also making use of the UIScrollView delegate.
In many examples, you can see "Pull to ..." is something simply check the scrollView.contentOffset.y
So, you may so something like this:
// code for checking pull to refresh function (simplified)
- (void) scrollViewDidScroll:(UIScrollView *)scrollView {
if (self.scrollView.contentOffset.y <= - 65.0f) {}
}
- (void) scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
if (self.scrollView.contentOffset.y <= - 65.0f) {}
}
change it to something like:
- (void) scrollViewDidScroll:(UIScrollView *)scrollView {
if ( -65.0f <= self.scrollView.contentOffset.y <= - 55.0f ) {
// give a area for checking the origin pull to refresh action
}
if (self.scrollView.contentOffset.y <= - 65.0f) {
// checking for ur function
}
}
- (void) scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
if ( -65.0f <= self.scrollView.contentOffset.y <= - 55.0f ) {
// give a area for checking the origin pull to refresh action
}
if (self.scrollView.contentOffset.y <= - 65.0f) {
// checking for ur function
// add ur view the UIScrollView / TableView
// set ur scrollview offset to show ur whole form
[scrollView setContentOffset:CGPointMake(0, y)];
}
}
And finally add a method call to ur form button to do what u want(remove the form and set back the scrollView content offset to (0,0))
(Sorry I am juz talking about not concept, I am not sure if it works)