Guest User

Untitled

a guest
Oct 16th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. - (BOOL)isAtBottom {
  2. //要考虑 contentInset
  3. UIEdgeInsets inset = self.contentInset;
  4. CGFloat heightWithOffsetY = self.contentOffset.y + CGRectGetHeight(self.bounds);
  5. CGFloat contentSizeHeightWithContentInset = self.contentSize.height + inset.top + inset.bottom;
  6. return heightWithOffsetY >= contentSizeHeightWithContentInset;
  7. }
Add Comment
Please, Sign In to add comment