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

CAListView(列表)

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

View*解释:添加头部视图。set/get{}。ListFooterView      类型:CAView*解释:添加尾部视图。set/get{}。SeparatorColor     类型:CAColor4B解释:设置cell分割线的颜色。set/get{}。ListHeaderHeight类型:unsigned int解释:设置头部视图的高度。set/get{}。ListFooterHeight类型:unsigned int解释:设置尾部视图的高度。set/get{}。SeparatorViewHeight类型:unsigned int解释:设置fell分割线的高度。set/get{}。AllowsHeadAndFootHover  类型:bool解释:允许头和尾的悬停。set/get{}。AllowsSelection   类型:bool解释:是否开启cell选择。is{}。AllowsMultipleSelection    类型:bool解释:是否可以多选cell。is{}。CAListView 方法介绍virtual void setAllowsSelection(bool var);  返回值:virtual void参数:类型参数名说明boolvar 解释:是否可以多选cellvoid setSelectAtIndex(unsigned int index);  返回值:void参数:类型参数名说明unsigned intindexcell的索引值解释:根据索引设置cell为选中状态void setUnSelectAtIndex(unsigned int index);  返回值:void参数:类型参数名说明unsigned intindexcell的索引值解释:根据索引设置cell为未选中状态virtual void setShowsScrollIndicators(bool var); 返回值:virtual void参数:类型参数名说明boolvar是否显示滚动条解释:设置显示滚动条CAListViewCell* dequeueReusableCellWithIdentifier(const char* reuseIdentifier);返回值:CAListViewCell*参数:类型参数名说明const char*reuseIdentifier标识符解释:可以重用单元标示符CAListViewCell* cellForRowAtIndex(unsigned int index);返回值:CAListViewCell*参数:类型参数名说明unsigned intindexcell的索引值解释:通过cell索引获取Indexvirtual void switchPCMode(bool var)返回值:virtual void参数:类型参数名说明boolvar开关解释:开关PC模式virtual bool ccTouchBegan(CATouch *pTouch, CAEvent *pEvent);返回值:virtual bool参数:类型参数名说明CATouch*pTouch触摸传递对象CAEvent*pEvent此参数待定解释:触摸事件开始时的回调函数virtual void ccTouchMoved(CATouch *pTouch, CAEvent *pEvent);返回值:virtual void参数:类型参数名说明CATouch*pTouch触摸传递对象CAEvent*pEvent此参数待定解释:触摸事件中触点移动时的回调函数virtual void ccTouchEnded(CATouch *pTouch, CAEvent *pEvent);返回值:virtual void参数:类型参数名说明CATouch*pTouch触摸传递对象CAEvent*pEvent此参数待定解释:触摸事件结束时的回调函数virtual void ccTouchCancelled(CATouch *pTouch, CAEvent *pEvent);返回值:virtual void参数:类型参数名说明CATouch*pTouch触摸传递对象CAEvent*pEvent此参数待定解释:触摸非正常结束时的回调函数。(例如:电话或锁屏)virtual void mouseMoved(CATouch* pTouch, CAEvent* pEvent);返回值:virtual void参数:类型参数名说明CATouch*pTouch传递对象CAEvent*pEvent此参数待定解释:鼠标移动virtual void mouseMovedOutSide(CATouch* pTouch, CAEvent* pEvent);返回值:virtual void参数:类型参数名说明CATouch*pTouch传递对象CAEvent*pEvent此参数待定解释:鼠标移出CAListViewDelegate 方法介绍virtual void listViewDidSelectCellAtIndex(CAListView *listView, unsigned int index)        返回值:virtual void参数:类型参数名说明CAListViewlistView当前的listViewunsigned intindexcell的索引值解释:选中cell时调用        virtual void listViewDidDeselectCellAtIndex(CAListView *listView, unsigned int index)        返回值:virtual void参数:类型参数名说明CAListViewlistView当前的listViewunsigned intindexcell的索引值解释:取消选择cell时调用CAListViewDataSource方法介绍virtual unsigned int numberOfIndex(CAListView *listView)        返回值:virtual unsigned int参数:类型参数名说明CAListViewlistView当前的listView解释:cell的总数量virtual unsigned int listViewHeightForIndex(CAListView *listView, unsigned int index)        返回值:virtual unsigned int参数:类型参数名说明CAListViewlistView当前的listViewunsigned intindexcell的索引值解释:cell的高度virtual CAListViewCell* listViewCellAtIndex(CAListView *listView, const DSize& cellSize, unsigned int index)       返回值:virtual CAListViewCell*参数:类型参数名说明CAListViewlistView当前的listViewDSizecellSizecell的sizeunsigned intindexcell的索引值解释:添加生成cellvirtual void listViewWillDisplayCellAtIndex(CAListView* table, CAListViewCell* cell, unsigned int index) ;返回值:virtual void参数:类型参数名说明CAListViewlistView当前的listViewCAListViewCellcell显示添加的cellunsigned intindexcell的索引值解释:回调当前将要显示的CAListViewCAListViewCell 属性介绍ContentView类型:CAView*解释:获得内容视图。get{}。BackgroundView类型:CAView*解释:设置背景视图。set/get{}。ReuseIdentifier类型:std::string解释:设置重用标识符。set/get{}。Index类型:unsigned int解释:获得重用标识符。set/get{}。ControlStateEffect类型:bool解释:设置控制状态效应。is/set{}。AllowsSelected类型:bool解释:CAListViewCell是否可以选择。is/set{}。CAListViewCell 方法介绍static CAListViewCell* create(const std::string& reuseIdentifier);返回值:static CAListViewCell*参数:类型参数名说明std::string&reuseIdentifier重用标识符解释:创建,默认Frame为(0,0,0,0)      virtual bool initWithReuseIdentifier(const std::string& reuseIdentifier);返回值:virtual bool参数:类型参数名说明std::string&reuseIdentifier重用标识符解释:创建一个空CAListViewCell,默认Frame为(0,0,0,0)

上一页  [1] [2] 


CAListView(列表)