ios - Changing UIScrollView frame in scrollViewDidScroll removes bouncing on top -


When I scroll to the UIcrollView, something strange is happening, I want to take it up and height it up I want because it is smaller by default. It works fine and I hear the Scroll ViewDidScroll representative, but it disables the rant at the top!

Even if I'm doing this in Scroll, ViewDidScroll's Top Rant has gone, the bottom is still bounced:

  scrollview.fr = CGFFFset (Self) Circle view. Frame, 0, 0);  

This is my real code in scrollViewDidScroll:

  self.maxScrollDistance = 400; If (scrollView.contentOffset.y & lt; = self.maxScrollDistance) {float newY = self.startScrollViewY - scrollView.contentOffset.y / 3; Float newScrollViewHeight = self.view.frame.size.height - newY; ScrollView.frame = CGRectMake (0, newY, self.scrollView.frame.size.width, newScrollViewHeight); }  

There is a problem that can be a problem, a video of the problem:

Thanks guys!

Your frame is always changed when scrolled down, and it is not bouncing because While changing the frame while scrolling into negative content

  If (scrollView.contentOffset.y> self.maxScrollDistance)  

when scrollView.contentOffset.y & lt; Set 0 and its change frame.

  If (scrollView.contentoffset.y> self.maxscrollDistance & ScrollviewContentAfacet.A & gt; 0) {// Todo} and if (scrollView .contentoffset.y & lt; = -self.maxscrollDistance & ScrollviewTont.set.Y & lt; 0) {// Todo}  

// See this code:

  if ( ScrollView.contentOffset.y & lt; self.maxScrollDistance & ScrollviewTontSet.A & gt; {} float newui = self.startScrollViewY - scrollView.contentOffset.y / 3; Float newScrollViewHeight = self.view.frame.size.height - newY; ScrollView.frame = CGRectMake (0, newY, self.scrollView.frame.size.width, newScrollViewHeight); } And if (scrollView.contentOffset.y & lt; = -self.maxScrollDistance & ScrollViewNetoffset.A & lt; 0) {Float NewYew = self.startScrollViewY + scrollView.contentOffset.y / 3; Float newScrollViewHeight = self.view.frame.size.height + newY; ScrollView.frame = CGRectMake (0, newY, self.scrollView.frame.size.width, newScrollViewHeight); }  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -