You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

5 years ago
  1. //
  2. // SlackTextViewController
  3. // https://github.com/slackhq/SlackTextViewController
  4. //
  5. // Copyright 2014-2016 Slack Technologies, Inc.
  6. // Licence: MIT-Licence
  7. //
  8. #import <UIKit/UIKit.h>
  9. /** @name UIScrollView additional features used for SlackTextViewController. */
  10. @interface UIScrollView (SLKAdditions)
  11. /** YES if the scrollView's offset is at the very top. */
  12. @property (nonatomic, readonly) BOOL slk_isAtTop;
  13. /** YES if the scrollView's offset is at the very bottom. */
  14. @property (nonatomic, readonly) BOOL slk_isAtBottom;
  15. /** The visible area of the content size. */
  16. @property (nonatomic, readonly) CGRect slk_visibleRect;
  17. /**
  18. Sets the content offset to the top.
  19. @param animated YES to animate the transition at a constant velocity to the new offset, NO to make the transition immediate.
  20. */
  21. - (void)slk_scrollToTopAnimated:(BOOL)animated;
  22. /**
  23. Sets the content offset to the bottom.
  24. @param animated YES to animate the transition at a constant velocity to the new offset, NO to make the transition immediate.
  25. */
  26. - (void)slk_scrollToBottomAnimated:(BOOL)animated;
  27. /**
  28. Stops scrolling, if it was scrolling.
  29. */
  30. - (void)slk_stopScrolling;
  31. @end