Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scrollview scrolls up while accessing last component of view controller

Tags:

ios

scrollview

I am fresher in iOS Development domain.

I placed scollview on Prooduct Detail ViewController, on this scollview placed product image, product details, add to cart button, and lastly recommended product list in collection view which scrolls horizontal.

My issue is that, when it scrolls down to view controller & tries to access collection view, it scrolls up because of that i can’t access collection view.

Here's my UI:

like image 779
snehal rokade Avatar asked Nov 19 '25 00:11

snehal rokade


1 Answers

self.automaticallyAdjustsScrollViewInsets=NO;

As per the apple documentation the automaticAdjustScrollViewInsets by default YES.

So its trying to control your scrollview.

add this in your viewdidload method and then try.

like image 79
Kishore Kumar Avatar answered Nov 21 '25 13:11

Kishore Kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!