当前位置:K88软件开发文章中心编程语言APP编程CrossApp → 文章内容

CAWaterfallView(瀑布流控件)

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-23 13:52:08

由 ?﹏???ζ???﹏﹏? 创建, 最后一次修改 2016-09-07 类说明CAWaterfallView 由很多的格子组成,但是每个格子的宽度和高速都是不确定的,是在动态改变的,就像瀑布一样,是一条线一条线的。CAWaterfallView 属性(点击查看方法介绍)属性说明WaterfallViewDataSource添加数据代理WaterfallViewDelegate添加交互代理WaterfallHeaderView添加头部视图WaterfallFooterView添加尾部视图WaterfallHeaderHeight设置头部的高度WaterfallFooterHeight设置尾部的高度ColumnCount列计数ItemMargin项目边缘ColumnMargin列边缘AllowsSelection允许选择AllowsMultipleSelection允许多个选择AlwaysTopSectionHeader总是显示顶部AlwaysBottomSectionFooter总是显示底部CAWaterfallView 方法(点击查看方法介绍)方法说明createWithFrame创建,并指定其FramecreateWithCenter创建,并设置其Centerinit初始化reloadData重载数据dequeueReusableCellWithIdentifier从复用队列中寻找指定标识符的cellsetAllowsSelection是否开启cell选择setAllowsMultipleSelection是否可以多选cellsetSelectRowAtIndexPath通过索引选择一行setUnSelectRowAtIndexPath通过索引取消选择一行setShowsScrollIndicators显示滚动指示器cellForRowAtIndexPath根据索引获取显示的celldisplayingWaterfallCell显示Waterfall的CellgetHighlightWaterfallCell突出Waterfall的CellswitchPCMode开关PC模式CAWaterfallView 属性说明WaterfallViewDataSource类型:CAWaterfallViewDataSource*解释:添加数据代理,set/get{}。WaterfallViewDelegate类型:CAWaterfallViewDelegate*解释:添加交互代理,set/get{}。WaterfallHeaderView类型:CAView*解释:添加头部视图,set/get{}。WaterfallFooterView类型:CAView*解释:添加尾部视图,set/get{}。WaterfallHeaderHeight类型:unsigned int解释:设置头部的高度,set/get{}。WaterfallFooterHeight类型:unsigned int解释:设置尾部的高度,set/get{}。ColumnCount类型:unsigned int解释:列计数,set/get{}。ItemMargin类型:unsigned int解释:项目边缘,set/get{}。ColumnMargin类型:unsigned int解释:列边缘,set/get{}。AllowsSelection类型:bool解释:允许选择,is{}。AllowsMultipleSelection类型:bool解释:允许多个选择,is{}。AlwaysTopSectionHeader类型:bool解释:总是显示顶部,is/set{}。AlwaysBottomSectionFooter类型:bool解释:总是显示底部,is/set{}。CAWaterfallView 方法说明static CAWaterfallView* createWithFrame(const DRect& rect);返回值:CAWaterfallView*参数:类型参数名说明const DRect&rect区域大小 解释:创建,并指定其Framestatic CAWaterfallView* createWithCenter(const DRect& rect);返回值:CAWaterfallView*参数:类型参数名说明const DRect&rect中心点的位置及大小解释:创建,并设置其Centervirtual bool init();返回值:bool参数:解释:初始化void reloadData();返回值:void参数:解释:重载数据CAWaterfallViewCell* dequeueReusableCellWithIdentifier(const char* reuseIdentifier);返回值:CAWaterfallViewCell*参数:类型参数名说明const char*reuseIdentifier重用标识符解释:从复用队列中寻找指定标识符的cellvirtual void setAllowsSelection(bool var);返回值:void参数:类型参数名说明boolvar是否开启解释:是否开启cell选择virtual void setAllowsMultipleSelection(bool var);返回值:void参数:类型参数名说明boolvar是否开启解释:是否可以多选cellvoid setSelectRowAtIndexPath(unsigned int itemIndex);返回值:void参数:类型参数名说明unsigned intitemIndex项目Index解释:通过索引选择一行void setUnSelectRowAtIndexPath(unsigned int itemIndex);返回值:void参数:类型参数名说明unsigned intitemIndex项目Index解释:通过索引取消选择一行virtual void setShowsScrollIndicators(bool var);返回值:void参数:类型参数名说明boolvar是否开启解释:显示滚动指示器CAWaterfallViewCell* cellForRowAtIndexPath(unsigned int itemIndex);返回值:CAWaterfallViewCell*参数:类型参数名说明unsigned intitemIndex项目Index解释:根据索引获取显示的cellconst CAVector<CAWaterfallViewCell*>& displayingWaterfallCell();返回值:CAVector<CAWaterfallViewCell*>&参数:解释:显示Waterfall的CellCAWaterfallViewCell* getHighlightWaterfallCell();返回值:CAWaterfallViewCell*参数:解释:突出Waterfall的Cellvirtual void switchPCMode(bool var);返回值:void参数:类型参数名说明boolvar是否开启解释:开关PC模式

CAWaterfallView(瀑布流控件)