Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>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.</p> <p>I assume the the UiView that u want to add to be "2nd Header". It should be something similar to "pull to refresh header".</p> <p>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 </p> <p>So, you may so something like this:</p> <p>// code for checking pull to refresh function (simplified)</p> <pre><code>- (void) scrollViewDidScroll:(UIScrollView *)scrollView { if (self.scrollView.contentOffset.y &lt;= - 65.0f) {} } - (void) scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { if (self.scrollView.contentOffset.y &lt;= - 65.0f) {} } </code></pre> <p>change it to something like:</p> <pre><code>- (void) scrollViewDidScroll:(UIScrollView *)scrollView { if ( -65.0f &lt;= self.scrollView.contentOffset.y &lt;= - 55.0f ) { // give a area for checking the origin pull to refresh action } if (self.scrollView.contentOffset.y &lt;= - 65.0f) { // checking for ur function } } - (void) scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { if ( -65.0f &lt;= self.scrollView.contentOffset.y &lt;= - 55.0f ) { // give a area for checking the origin pull to refresh action } if (self.scrollView.contentOffset.y &lt;= - 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)]; } } </code></pre> <p>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))</p> <p>(Sorry I am juz talking about not concept, I am not sure if it works)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload