UIScrollView(FWUIKit)
@interface UIScrollView (FWUIKit)
/// 判断当前scrollView内容是否足够滚动
@property (nonatomic, assign, readonly) BOOL fw_canScroll NS_REFINED_FOR_SWIFT;
/// 判断当前的scrollView内容是否足够水平滚动
@property (nonatomic, assign, readonly) BOOL fw_canScrollHorizontal NS_REFINED_FOR_SWIFT;
/// 判断当前的scrollView内容是否足够纵向滚动
@property (nonatomic, assign, readonly) BOOL fw_canScrollVertical NS_REFINED_FOR_SWIFT;
/// 当前scrollView滚动到指定边
- (void)fw_scrollToEdge:(UIRectEdge)edge animated:(BOOL)animated NS_REFINED_FOR_SWIFT;
/// 是否已滚动到指定边
- (BOOL)fw_isScrollToEdge:(UIRectEdge)edge NS_REFINED_FOR_SWIFT;
/// 获取当前的scrollView滚动到指定边时的contentOffset(包含contentInset)
- (CGPoint)fw_contentOffsetOfEdge:(UIRectEdge)edge NS_REFINED_FOR_SWIFT;
/// 总页数,自动识别翻页方向
@property (nonatomic, assign, readonly) NSInteger fw_totalPage NS_REFINED_FOR_SWIFT;
/// 当前页数,不支持动画,自动识别翻页方向
@property (nonatomic, assign) NSInteger fw_currentPage NS_REFINED_FOR_SWIFT;
/// 设置当前页数,支持动画,自动识别翻页方向
- (void)fw_setCurrentPage:(NSInteger)page animated:(BOOL)animated NS_REFINED_FOR_SWIFT;
/// 是否是最后一页,自动识别翻页方向
@property (nonatomic, assign, readonly) BOOL fw_isLastPage NS_REFINED_FOR_SWIFT;
@end
Undocumented
-
判断当前scrollView内容是否足够滚动
Declaration
Objective-C
@property (nonatomic, readonly) BOOL fw_canScroll;
-
判断当前的scrollView内容是否足够水平滚动
Declaration
Objective-C
@property (nonatomic, readonly) BOOL fw_canScrollHorizontal;
-
判断当前的scrollView内容是否足够纵向滚动
Declaration
Objective-C
@property (nonatomic, readonly) BOOL fw_canScrollVertical;
-
当前scrollView滚动到指定边
Declaration
Objective-C
- (void)fw_scrollToEdge:(UIRectEdge)edge animated:(BOOL)animated;
-
是否已滚动到指定边
Declaration
Objective-C
- (BOOL)fw_isScrollToEdge:(UIRectEdge)edge;
-
获取当前的scrollView滚动到指定边时的contentOffset(包含contentInset)
Declaration
Objective-C
- (CGPoint)fw_contentOffsetOfEdge:(UIRectEdge)edge;
-
总页数,自动识别翻页方向
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger fw_totalPage;
-
当前页数,不支持动画,自动识别翻页方向
Declaration
Objective-C
@property (nonatomic) NSInteger fw_currentPage;
-
设置当前页数,支持动画,自动识别翻页方向
Declaration
Objective-C
- (void)fw_setCurrentPage:(NSInteger)page animated:(BOOL)animated;
-
是否是最后一页,自动识别翻页方向
Declaration
Objective-C
@property (nonatomic, readonly) BOOL fw_isLastPage;