//
// ZFlowView.h
// ZFlowView
//
// Created by ie on 16/3/17.
// Copyright © 2016年 卡萨诺瓦. All rights reserved.
//
#import <UIKit/UIKit.h>
/**
* 定义枚举,用于后面获取不同的Margin使用
*/
typedef enum {
ZFlowViewMarginTypeTop,
ZFlowViewMarginTypeBottom,
ZFlowViewMarginTypeLeft,
ZFlowViewMarginTypeRight,
ZFlowViewMarginTypeColumn,
ZFlowViewMarginTypeRow
} ZFlowViewMarginType;
@class ZFlowViewCell,ZFlowView;
#pragma mark - 定时FlowView的数据来源的协议类
@protocol ZFlowViewDataSource <NSObject>
@required
/**
* 返回多少组数据
*/
- (NSUInteger)numberOfCellsInFlowView:(ZFlowView *)flowView;
/**
* 返回一个ZFlowViewCell
*/
- (ZFlowViewCell *)flowView:(ZFlowView *)flowView cellAtIndex:(NSUInteger)index;
@optional
/**
* 返回多少列
*/
- (NSUInteger)numberOfColumnsInFlowView:(ZFlowView *)flowView;
@end
#pragma mark - FlowView的代理声明
@protocol ZFlowViewDelegate<UIScrollViewDelegate>
@optional
/**
* 返回对应index的cell的高度
*/
- (CGFloat)flowView:(ZFlowView *)flowView heightAtIndex:(NSUInteger)index;
/**
* 返回对应间距类型的间距,top,bottom,left,right,col
*/
- (CGFloat)flowView:(ZFlowView *)flowView marginForType:(ZFlowViewMarginType)type;
/**
* 点击index对应的cell
*/
- (void)flowView:(ZFlowView *)flowView didSelectedAtIndex:(NSUInteger)index;
@end
@interface ZFlowView : UIScrollView
@property (nonatomic, weak) id<ZFlowViewDataSource> dataSource;
@property (nonatomic, weak) id<ZFlowViewDelegate> delegate;
/**
* cell的高度
*/
- (CGFloat)cellWidth;
/**
* 刷新方法
*/
- (void)reloadData;
/**
* 根据表示去缓存池查找可循环利用的cell
*/
- (id)dequeueReusableCellWithIdentifier:(NSString *)indentifier;
/**
* 获取当前cell在flowview中的index
*/
- (NSInteger)indexForCell:(ZFlowViewCell *)cell;
/**
* 返回当前index处的CGRect
*/
- (CGRect)frameAtIndex:(NSInteger)index;
@end
ios瀑布流照片墙不规则九宫格型
需积分: 32 18 浏览量
2016-03-18
23:32:34
上传
评论
收藏 527KB ZIP 举报
阿理斯特
- 粉丝: 7
- 资源: 97
最新资源
- 华为od题库华为od题库
- 1_base.apk2835405537270739504.apk
- 120 240 VAC_ASD-4D5 -ASD-006.IGS
- WinCHM.exe CHM 文档编辑器
- FileGeeCNP.exe
- record record record record record record record record record
- Android 启动提示Android 正在升级...提示源码分析
- pojie-drawio-confluence-plugin-9.5.8.obr
- 信息学奥赛2020年NOIP真题
- SunloginClient-15.1.0.58718-x64.exe
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈