W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
類說明
CAWaterfallView 由很多的格子組成,但是每個格子的寬度和高速都是不確定的,是在動態(tài)改變的,就像瀑布一樣,是一條線一條線的。
CAWaterfallView 屬性(點擊查看方法介紹)
屬性 | 說明 |
WaterfallViewDataSource | 添加數(shù)據(jù)代理 |
WaterfallViewDelegate | 添加交互代理 |
WaterfallHeaderView | 添加頭部視圖 |
WaterfallFooterView | 添加尾部視圖 |
WaterfallHeaderHeight | 設(shè)置頭部的高度 |
WaterfallFooterHeight | 設(shè)置尾部的高度 |
ColumnCount | 列計數(shù) |
ItemMargin | 項目邊緣 |
ColumnMargin | 列邊緣 |
AllowsSelection | 允許選擇 |
AllowsMultipleSelection | 允許多個選擇 |
AlwaysTopSectionHeader | 總是顯示頂部 |
AlwaysBottomSectionFooter | 總是顯示底部 |
CAWaterfallView 方法(點擊查看方法介紹)
方法 | 說明 |
createWithFrame | 創(chuàng)建,并指定其Frame |
createWithCenter | 創(chuàng)建,并設(shè)置其Center |
init | 初始化 |
reloadData | 重載數(shù)據(jù) |
dequeueReusableCellWithIdentifier | 從復用隊列中尋找指定標識符的cell |
setAllowsSelection | 是否開啟cell選擇 |
setAllowsMultipleSelection | 是否可以多選cell |
setSelectRowAtIndexPath | 通過索引選擇一行 |
setUnSelectRowAtIndexPath | 通過索引取消選擇一行 |
setShowsScrollIndicators | 顯示滾動指示器 |
cellForRowAtIndexPath | 根據(jù)索引獲取顯示的cell |
displayingWaterfallCell | 顯示W(wǎng)aterfall的Cell |
getHighlightWaterfallCell | 突出Waterfall的Cell |
switchPCMode | 開關(guān)PC模式 |
CAWaterfallView 屬性說明
類型:CAWaterfallViewDataSource*
解釋:添加數(shù)據(jù)代理,set/get{}。
類型:CAWaterfallViewDelegate*
解釋:添加交互代理,set/get{}。
類型:CAView*
解釋:添加頭部視圖,set/get{}。
類型:CAView*
解釋:添加尾部視圖,set/get{}。
類型:unsigned int
解釋:設(shè)置頭部的高度,set/get{}。
類型:unsigned int
解釋:設(shè)置尾部的高度,set/get{}。
類型:unsigned int
解釋:列計數(shù),set/get{}。
類型:unsigned int
解釋:項目邊緣,set/get{}。
類型:unsigned int
解釋:列邊緣,set/get{}。
類型:bool
解釋:允許選擇,is{}。
類型:bool
解釋:允許多個選擇,is{}。
類型:bool
解釋:總是顯示頂部,is/set{}。
類型:bool
解釋:總是顯示底部,is/set{}。
CAWaterfallView 方法說明
static CAWaterfallView* createWithFrame(const DRect& rect);
返回值:CAWaterfallView*
參數(shù):
類型 | 參數(shù)名 | 說明 |
const DRect& | rect | 區(qū)域大小 |
解釋:創(chuàng)建,并指定其Frame
static CAWaterfallView* createWithCenter(const DRect& rect);
返回值:CAWaterfallView*
參數(shù):
類型 | 參數(shù)名 | 說明 |
const DRect& | rect | 中心點的位置及大小 |
解釋:
創(chuàng)建,并設(shè)置其Center
返回值:bool
參數(shù):
解釋:初始化
返回值:void
參數(shù):
解釋:重載數(shù)據(jù)
CAWaterfallViewCell* dequeueReusableCellWithIdentifier(const char* reuseIdentifier);
返回值:CAWaterfallViewCell*
參數(shù):
類型 | 參數(shù)名 | 說明 |
const char* | reuseIdentifier | 重用標識符 |
解釋:從復用隊列中尋找指定標識符的cell
virtual void setAllowsSelection(bool var);
返回值:void
參數(shù):
類型 | 參數(shù)名 | 說明 |
bool | var | 是否開啟 |
解釋:是否開啟cell選擇
virtual void setAllowsMultipleSelection(bool var);
返回值:void
參數(shù):
類型 | 參數(shù)名 | 說明 |
bool | var | 是否開啟 |
解釋:是否可以多選cell
void setSelectRowAtIndexPath(unsigned int itemIndex);
返回值:void
參數(shù):
類型 | 參數(shù)名 | 說明 |
unsigned int | itemIndex | 項目Index |
解釋:通過索引選擇一行
void setUnSelectRowAtIndexPath(unsigned int itemIndex);
返回值:void
參數(shù):
類型 | 參數(shù)名 | 說明 |
unsigned int | itemIndex | 項目Index |
解釋:通過索引取消選擇一行
virtual void setShowsScrollIndicators(bool var);
返回值:void
參數(shù):
類型 | 參數(shù)名 | 說明 |
bool | var | 是否開啟 |
解釋:顯示滾動指示器
CAWaterfallViewCell* cellForRowAtIndexPath(unsigned int itemIndex);
返回值:CAWaterfallViewCell*
參數(shù):
類型 | 參數(shù)名 | 說明 |
unsigned int | itemIndex | 項目Index |
解釋:根據(jù)索引獲取顯示的cell
const CAVector<CAWaterfallViewCell*>& displayingWaterfallCell();
返回值:CAVector<CAWaterfallViewCell*>&
參數(shù):
解釋:顯示W(wǎng)aterfall的Cell
CAWaterfallViewCell* getHighlightWaterfallCell();
返回值:CAWaterfallViewCell*
參數(shù):
解釋:突出Waterfall的Cell
virtual void switchPCMode(bool var);
返回值:void
參數(shù):
類型 | 參數(shù)名 | 說明 |
bool | var | 是否開啟 |
解釋:開關(guān)PC模式
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: