Chatto icon indicating copy to clipboard operation
Chatto copied to clipboard

Scroll bar insets

Open brandtdaniels opened this issue 5 years ago • 6 comments

I've created an issue on SO regarding the scroll bar insets I am experiencing in my subclass of BaseChatViewController:

https://stackoverflow.com/questions/59884797/uiscrollview-bar-insets-the-size-of-the-tab-bar-and-nav-bar

Any help here would be preferred.

brandtdaniels avatar Jan 24 '20 22:01 brandtdaniels

Hey @brandtdaniels, On which iOS version do you see this issue?

wiruzx avatar May 15 '20 14:05 wiruzx

iOS 13

brandtdaniels avatar May 15 '20 16:05 brandtdaniels

As you've mentioned in your StackOverflow post, I think it's probably related to the navigation and tab bar. Can you provide some minimal reproducible example so we can help you with that? Also you can try to override viewDidLayoutSubviews and after calling super, call collectionView.chatto_setVerticalScrollIndicatorInsets with your own insets

wiruzx avatar May 15 '20 17:05 wiruzx

@wiruzx I get this complaint: Value of type 'UICollectionView' has no member 'chatto_setVerticalScrollIndicatorInsets'

brandtdaniels avatar May 15 '20 18:05 brandtdaniels

@brandtdaniels, Sorry, I missed that it is internal. Try collectionView.verticalScrollIndicatorInsets = instead

wiruzx avatar May 15 '20 18:05 wiruzx

@wiruzx I did confirm that this is not an issue on iOS 12, only seeing it on iOS 13.

This seems to fix the issue:

  override func viewDidLayoutSubviews() {

    super.viewDidLayoutSubviews()

    collectionView?.verticalScrollIndicatorInsets = .zero

  }

brandtdaniels avatar May 15 '20 18:05 brandtdaniels