W3Cschool
恭喜您成為首批注冊(cè)用戶(hù)
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
類(lèi)說(shuō)明
CAWaterfallView 由很多的格子組成,但是每個(gè)格子的寬度和高速都是不確定的,是在動(dòng)態(tài)改變的,就像瀑布一樣,是一條線(xiàn)一條線(xiàn)的。
CAWaterfallView 屬性(點(diǎn)擊查看方法介紹)
屬性 | 說(shuō)明 |
WaterfallViewDataSource | 添加數(shù)據(jù)代理 |
WaterfallViewDelegate | 添加交互代理 |
WaterfallHeaderView | 添加頭部視圖 |
WaterfallFooterView | 添加尾部視圖 |
WaterfallHeaderHeight | 設(shè)置頭部的高度 |
WaterfallFooterHeight | 設(shè)置尾部的高度 |
ColumnCount | 列計(jì)數(shù) |
ItemMargin | 項(xiàng)目邊緣 |
ColumnMargin | 列邊緣 |
AllowsSelection | 允許選擇 |
AllowsMultipleSelection | 允許多個(gè)選擇 |
AlwaysTopSectionHeader | 總是顯示頂部 |
AlwaysBottomSectionFooter | 總是顯示底部 |
CAWaterfallView 方法(點(diǎn)擊查看方法介紹)
方法 | 說(shuō)明 |
createWithFrame | 創(chuàng)建,并指定其Frame |
createWithCenter | 創(chuàng)建,并設(shè)置其Center |
init | 初始化 |
reloadData | 重載數(shù)據(jù) |
dequeueReusableCellWithIdentifier | 從復(fù)用隊(duì)列中尋找指定標(biāo)識(shí)符的cell |
setAllowsSelection | 是否開(kāi)啟cell選擇 |
setAllowsMultipleSelection | 是否可以多選cell |
setSelectRowAtIndexPath | 通過(guò)索引選擇一行 |
setUnSelectRowAtIndexPath | 通過(guò)索引取消選擇一行 |
setShowsScrollIndicators | 顯示滾動(dòng)指示器 |
cellForRowAtIndexPath | 根據(jù)索引獲取顯示的cell |
displayingWaterfallCell | 顯示W(wǎng)aterfall的Cell |
getHighlightWaterfallCell | 突出Waterfall的Cell |
switchPCMode | 開(kāi)關(guān)PC模式 |
CAWaterfallView 屬性說(shuō)明
類(lèi)型:CAWaterfallViewDataSource*
解釋?zhuān)禾砑訑?shù)據(jù)代理,set/get{}。
類(lèi)型:CAWaterfallViewDelegate*
解釋?zhuān)禾砑咏换ゴ恚瑂et/get{}。
類(lèi)型:CAView*
解釋?zhuān)禾砑宇^部視圖,set/get{}。
類(lèi)型:CAView*
解釋?zhuān)禾砑游膊恳晥D,set/get{}。
類(lèi)型:unsigned int
解釋?zhuān)涸O(shè)置頭部的高度,set/get{}。
類(lèi)型:unsigned int
解釋?zhuān)涸O(shè)置尾部的高度,set/get{}。
類(lèi)型:unsigned int
解釋?zhuān)毫杏?jì)數(shù),set/get{}。
類(lèi)型:unsigned int
解釋?zhuān)喉?xiàng)目邊緣,set/get{}。
類(lèi)型:unsigned int
解釋?zhuān)毫羞吘?,set/get{}。
類(lèi)型:bool
解釋?zhuān)涸试S選擇,is{}。
類(lèi)型:bool
解釋?zhuān)涸试S多個(gè)選擇,is{}。
類(lèi)型:bool
解釋?zhuān)嚎偸秋@示頂部,is/set{}。
類(lèi)型:bool
解釋?zhuān)嚎偸秋@示底部,is/set{}。
CAWaterfallView 方法說(shuō)明
static CAWaterfallView* createWithFrame(const DRect& rect);
返回值:CAWaterfallView*
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
const DRect& | rect | 區(qū)域大小 |
解釋?zhuān)簞?chuàng)建,并指定其Frame
static CAWaterfallView* createWithCenter(const DRect& rect);
返回值:CAWaterfallView*
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
const DRect& | rect | 中心點(diǎn)的位置及大小 |
解釋?zhuān)?/span>
創(chuàng)建,并設(shè)置其Center
返回值:bool
參數(shù):
解釋?zhuān)撼跏蓟?/span>
返回值:void
參數(shù):
解釋?zhuān)褐剌d數(shù)據(jù)
CAWaterfallViewCell* dequeueReusableCellWithIdentifier(const char* reuseIdentifier);
返回值:CAWaterfallViewCell*
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
const char* | reuseIdentifier | 重用標(biāo)識(shí)符 |
解釋?zhuān)簭膹?fù)用隊(duì)列中尋找指定標(biāo)識(shí)符的cell
virtual void setAllowsSelection(bool var);
返回值:void
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
bool | var | 是否開(kāi)啟 |
解釋?zhuān)菏欠耖_(kāi)啟cell選擇
virtual void setAllowsMultipleSelection(bool var);
返回值:void
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
bool | var | 是否開(kāi)啟 |
解釋?zhuān)菏欠窨梢远噙xcell
void setSelectRowAtIndexPath(unsigned int itemIndex);
返回值:void
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
unsigned int | itemIndex | 項(xiàng)目Index |
解釋?zhuān)和ㄟ^(guò)索引選擇一行
void setUnSelectRowAtIndexPath(unsigned int itemIndex);
返回值:void
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
unsigned int | itemIndex | 項(xiàng)目Index |
解釋?zhuān)和ㄟ^(guò)索引取消選擇一行
virtual void setShowsScrollIndicators(bool var);
返回值:void
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
bool | var | 是否開(kāi)啟 |
解釋?zhuān)猴@示滾動(dòng)指示器
CAWaterfallViewCell* cellForRowAtIndexPath(unsigned int itemIndex);
返回值:CAWaterfallViewCell*
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
unsigned int | itemIndex | 項(xiàng)目Index |
解釋?zhuān)焊鶕?jù)索引獲取顯示的cell
const CAVector<CAWaterfallViewCell*>& displayingWaterfallCell();
返回值:CAVector<CAWaterfallViewCell*>&
參數(shù):
解釋?zhuān)猴@示W(wǎng)aterfall的Cell
CAWaterfallViewCell* getHighlightWaterfallCell();
返回值:CAWaterfallViewCell*
參數(shù):
解釋?zhuān)和怀鯳aterfall的Cell
virtual void switchPCMode(bool var);
返回值:void
參數(shù):
類(lèi)型 | 參數(shù)名 | 說(shuō)明 |
bool | var | 是否開(kāi)啟 |
解釋?zhuān)洪_(kāi)關(guān)PC模式
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話(huà):173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: