I have UIViewController
that hold UIScrollView
inside it.
The m_scrollView
is with pagingEnabled=YES;
On each "page" I have UIViewController that display article.
To prevent bouncing when the user swipe from page to page i used :
m_scrollView.bounces=NO;
and even
m_scrollView.alwaysBounceHorizonal=NO;
I notice the change was only to the last page that is not bounce. But when swiping the other pages, they bounce.
EDIT: the optimal solution was make the first and last page bounce ( so the user will get repsond there is no more pages\paging) and the other pages without bouncing
the annoying with the bounce when swiping pages is the bounce effect is not equal and same. somtimes it bounce more, and somtimes less.
I tought is somthing to do with the loading data in the pages, but I dont think it's the case, cause it happens also when all pages are loaded and no async operation of loading are happening in the background. Any ideas ?
EDIT 2 : I guess the bounce property is about the edge of the UIScrollView, But when moving from page to page there is also bouncing. Sometimes I can see a little of next-next page. For example : swiping from page 2 to page 3 , and in the animation of swiping I can see for 0.1 second page 4.
Also, the animation of swiping is not constant. and it feel that each swipe acts little diffrent. Thanks in advance.
just do this:
_scrollView = [[UIScrollView alloc]init];
_scrollView.pagingEnabled = YES;
_scrollView.bounces = NO; //Here
then, no bounce any more!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With