scrollOffsetThreshold should consider originalBottomInset. So I think scrollOffsetThreshold += self.originalBottomInset; should be inserted after CGFloat scrollOffsetThreshold = scrollViewContentHeight-self.scrollView.bounds.size.height;
Otherwise, when scrollview has bottom inset, supposed it's a positive number, and it currently reaches to the end, state will still be loading even though user scrolls up.
scrollOffsetThreshold
should consideroriginalBottomInset
. So I thinkscrollOffsetThreshold += self.originalBottomInset;
should be inserted afterCGFloat scrollOffsetThreshold = scrollViewContentHeight-self.scrollView.bounds.size.height;
Otherwise, when scrollview has bottom inset, supposed it's a positive number, and it currently reaches to the end, state will still be loading even though user scrolls up.