filesbox/app/filesbox_ios/FilesBox/Pods/JXPagingView/Sources/JXPagerView/JXPagerView.h

132 lines
5.5 KiB
C
Raw Permalink Normal View History

2023-09-21 02:53:23 +00:00
//
// JXPagerView.h
// JXPagerView
//
// Created by jiaxin on 2018/8/27.
// Copyright © 2018年 jiaxin. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "JXPagerMainTableView.h"
#import "JXPagerListContainerView.h"
@class JXPagerView;
@protocol JXPagerViewDelegate <NSObject>
/**
tableHeaderView的高度
*/
- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView;
/**
tableHeaderView
*/
- (UIView *)tableHeaderViewInPagerView:(JXPagerView *)pagerView;
/**
HeaderView的高度
*/
- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView;
/**
HeaderViewJXCategoryViewGithub:https://github.com/pujiaxin33/JXCategoryView你也可以选择其他的三方库或者自己写
*/
- (UIView *)viewForPinSectionHeaderInPagerView:(JXPagerView *)pagerView;
/**
*/
- (NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView;
/**
index初始化一个对应列表实例`JXPagerViewListViewDelegate`
UIView封装的UIView遵从`JXPagerViewListViewDelegate`UIView即可
UIViewController封装的UIViewController遵从`JXPagerViewListViewDelegate`UIViewController即可
@param pagerView pagerView description
@param index index description
@return
*/
- (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index;
@optional
/// 返回对应index的列表唯一标识
/// @param pagerView pagerView description
/// @param index index description
- (NSString *)pagerView:(JXPagerView *)pagerView listIdentifierAtIndex:(NSInteger)index;
- (void)mainTableViewDidScroll:(UIScrollView *)scrollView __attribute__ ((deprecated));
- (void)pagerView:(JXPagerView *)pagerView mainTableViewDidScroll:(UIScrollView *)scrollView;
- (void)pagerView:(JXPagerView *)pagerView mainTableViewWillBeginDragging:(UIScrollView *)scrollView;
- (void)pagerView:(JXPagerView *)pagerView mainTableViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate;
- (void)pagerView:(JXPagerView *)pagerView mainTableViewDidEndDecelerating:(UIScrollView *)scrollView;
- (void)pagerView:(JXPagerView *)pagerView mainTableViewDidEndScrollingAnimation:(UIScrollView *)scrollView;
/**
UIScrollView或UICollectionView的Class
UIScrollView内部逻辑FDFullscreenPopGesture
@param pagerView JXPagerView
@return UIScrollView实例
*/
- (Class)scrollViewClassInlistContainerViewInPagerView:(JXPagerView *)pagerView;
@end
@interface JXPagerView : UIView
/**
self.categoryView.defaultSelectedIndex保持一致
*/
@property (nonatomic, assign) NSInteger defaultSelectedIndex;
@property (nonatomic, strong, readonly) JXPagerMainTableView *mainTableView;
@property (nonatomic, strong, readonly) JXPagerListContainerView *listContainerView;
/**
key就是index值value是对应的列表
*/
@property (nonatomic, strong, readonly) NSDictionary <NSNumber *, id<JXPagerViewListViewDelegate>> *validListDict;
/**
sectionHeader的垂直偏移量
*/
@property (nonatomic, assign) NSInteger pinSectionHeaderVerticalOffset;
/**
YES
*/
@property (nonatomic, assign) BOOL isListHorizontalScrollEnabled;
/**
YESheaderView滚动到顶部开始滚动列表时NOYES
*/
@property (nonatomic, assign) BOOL automaticallyDisplayListVerticalScrollIndicator;
/**
allowsCacheList为true时`- (NSString *)pagerView:(JXPagerView *)pagerView listIdentifierAtIndex:(NSInteger)index`
*/
@property (nonatomic, assign) BOOL allowsCacheList;
- (instancetype)initWithDelegate:(id<JXPagerViewDelegate>)delegate;
- (instancetype)initWithDelegate:(id<JXPagerViewDelegate>)delegate listContainerType:(JXPagerListContainerType)type NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
- (void)reloadData;
- (void)resizeTableHeaderViewHeightWithAnimatable:(BOOL)animatable duration:(NSTimeInterval)duration curve:(UIViewAnimationCurve)curve;
@end
/**
使使
*/
@interface JXPagerView (UISubclassingGet)
@property (nonatomic, strong, readonly) UIScrollView *currentScrollingListView;
@property (nonatomic, strong, readonly) id<JXPagerViewListViewDelegate> currentList;
@property (nonatomic, assign, readonly) CGFloat mainTableViewMaxContentOffsetY;
@end
@interface JXPagerView (UISubclassingHooks)
- (void)preferredProcessListViewDidScroll:(UIScrollView *)scrollView;
- (void)preferredProcessMainTableViewDidScroll:(UIScrollView *)scrollView;
- (void)setMainTableViewToMaxContentOffsetY;
- (void)setListScrollViewToMinContentOffsetY:(UIScrollView *)scrollView;
- (CGFloat)minContentOffsetYInListScrollView:(UIScrollView *)scrollView;
@end