I use the following code to set the contentInset
for my tableView
.
self.scrollView.contentInset = UIEdgeInsetsMake(109, 0, 44, 0);
But this triggers the UIScrollView
delegate method scrollViewDidScroll:
.
Is this the expected behaviour? If so, is there any workaround to avoid this situation?
Thanks in advance.
You can try removing the scroll views delegate before setting the content insets. Then reapply the delegate.
id scrollDelegate = scrollView.delegate;
scrollView.delegate = nil;
scrollView.contentInset = UIEdgeInsetsMake(109, 0, 44, 0);
scrollView.delegate = scrollDelegate;
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