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

92 lines
2.7 KiB
C
Raw Normal View History

2023-09-21 02:53:23 +00:00
//
// JXPagerSmoothView.h
// JXPagerViewExample-OC
//
// Created by jiaxin on 2019/11/15.
// Copyright © 2019 jiaxin. All rights reserved.
//
#import <UIKit/UIKit.h>
@class JXPagerSmoothView;
@protocol JXPagerSmoothViewListViewDelegate <NSObject>
/**
listViewvc包裹的就是vc.viewview包裹的view自己
*/
- (UIView *)listView;
/**
JXPagerSmoothViewListViewDelegate内部持有的UIScrollView或UITableView或UICollectionView
*/
- (UIScrollView *)listScrollView;
@optional
- (void)listDidAppear;
- (void)listDidDisappear;
@end
@protocol JXPagerSmoothViewDataSource <NSObject>
/**
header的高度
*/
- (CGFloat)heightForPagerHeaderInPagerView:(JXPagerSmoothView *)pagerView;
/**
header视图
*/
- (UIView *)viewForPagerHeaderInPagerView:(JXPagerSmoothView *)pagerView;
/**
*/
- (CGFloat)heightForPinHeaderInPagerView:(JXPagerSmoothView *)pagerView;
/**
*/
- (UIView *)viewForPinHeaderInPagerView:(JXPagerSmoothView *)pagerView;
/**
*/
- (NSInteger)numberOfListsInPagerView:(JXPagerSmoothView *)pagerView;
/**
index初始化一个对应列表实例`JXPagerSmoothViewListViewDelegate`
UIView封装的UIView遵从`JXPagerSmoothViewListViewDelegate`UIView即可
UIViewController封装的UIViewController遵从`JXPagerSmoothViewListViewDelegate`UIViewController即可
@param pagerView pagerView description
@param index index description
@return
*/
- (id<JXPagerSmoothViewListViewDelegate>)pagerView:(JXPagerSmoothView *)pagerView initListAtIndex:(NSInteger)index;
@end
@protocol JXPagerSmoothViewDelegate <NSObject>
- (void)pagerSmoothViewDidScroll:(UIScrollView *)scrollView;
@end
@interface JXPagerSmoothView : UIView
/**
key就是@(index)value是对应的列表
*/
@property (nonatomic, strong, readonly) NSDictionary <NSNumber *, id<JXPagerSmoothViewListViewDelegate>> *listDict;
@property (nonatomic, strong, readonly) UICollectionView *listCollectionView;
@property (nonatomic, assign) NSInteger defaultSelectedIndex;
@property (nonatomic, weak) id<JXPagerSmoothViewDelegate> delegate;
- (instancetype)initWithDataSource:(id<JXPagerSmoothViewDataSource>)dataSource NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
- (void)reloadData;
@end