UIScrollView not showing scroll indicator

后端 未结 8 1300
借酒劲吻你
借酒劲吻你 2020-12-24 12:40

I have a UIScrollView which I create and size dynamically using...

scrollView.contentSize = CGSizeMake(scrollView.frame.size.width , length);
8条回答
  •  悲&欢浪女
    2020-12-24 13:16

    It can happen also if the parent of the scrollview is smaller horizontally than the scroll view itself :

    The scroll bar is stuck to the right side of the ScrollView / TableView and this right side is not visible due to the parent bounds ( with a clipToBounds hidding it for instance).

    I've seen this issue so I share it in case it can help.

    Just check the width of your ScrollView's frame not to be bigger than the width of its parent view frame.

提交回复
热议问题