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

CATableView(表单视图)

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

:通过section索引获取section底部的高度float getRowHeightInSectionInRow(unsigned int section, unsigned int row);返回值:float参数:类型参数名说明unsigned intsectioncell所属的区域unsigned introwcell所在行数解释:通过索引cell高度获取section和cell     static CATableView* createWithFrame(const DRect& rect);返回值:static CATableView*参数:类型参数名说明DRectrect区域大小解释:创建,并指定其Frame,默认Frame为(0,0,0,0)static CATableView* createWithCenter(const DRect& rect);返回值:static CATableView*参数:类型参数名说明DRectrect中心点的位置及大小解释:创建,并指定其Center,默认Center为(0,0,0,0)virtual bool init();返回值:virtual void参数:解释:初始化void reloadData();返回值:void参数:解释:重载数据CATableViewCell* dequeueReusableCellWithIdentifier(const char* reuseIdentifier);返回值:CATableViewCell*参数:类型参数名说明const char*reuseIdentifier重用标识符解释:可以重用单元标示符CATableViewCell* cellForRowAtIndexPath(unsigned int section, unsigned int row);返回值:CATableViewCell*参数:类型参数名说明unsigned intsectioncell所属的区域unsigned introwcell所在行数解释:通过索引cell获取Index路径virtual 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此参数待定解释:鼠标移出CATableViewCell 属性介绍ContentView类型:CAView*解释:内容视图。get{}。BackgroundView类型:CAView*解释:背景视图。set/get{}。ReuseIdentifier类型:std::string解释:重用标识符。set/get{}。Section类型:unsigned int解释:section。get{}。Row类型:unsigned int解释:cell。get{}。ControlStateEffect类型:bool解释:控制状态。is/set{}。AllowsSelected类型:bool解释:允许选择。is/set{}。CATableViewCell 方法介绍static CATableViewCell* create(const std::string& reuseIdentifier);返回值:static CATableViewCell*参数:类型参数名说明std::stringreuseIdentifier重用标识符解释:创建,默认Frame为(0,0,0,0)virtual bool initWithReuseIdentifier(const std::string& reuseIdentifier);返回值:virtual bool参数:类型参数名说明std::stringreuseIdentifier重用标识符解释:重用标识符初始化CATableViewDelegate 方法说明virtual void tableViewDidSelectRowAtIndexPath(CATableView* table, unsigned int section, unsigned int row);返回值:virtual void参数:类型参数名说明CATableViewtable当前tableViewunsigned intsectioncell所属的区域unsigned introwcell所在行数解释:选中cell时调用virtual void tableViewDidDeselectRowAtIndexPath(CATableView* table, unsigned int section, unsigned int row);返回值:virtual void参数:类型参数名说明CATableViewtable当前tableViewunsigned intsectioncell所属的区域unsigned introwcell所在行数解释:取消选择cell时调用CATableViewDataSource 方法说明virtual CATableViewCell* tableCellAtIndex(CATableView* table, const DSize& cellSize, unsigned int section, unsigned int row);返回值:virtual CATableViewCell*参数:类型参数名说明CATableViewtable当前tableViewDSizecellSizecell大小unsigned intsectioncell所属的区域unsigned introwcell所在行数解释:获取指定cellvirtual unsigned int tableViewHeightForRowAtIndexPath(CATableView* table, unsigned int section, unsigned int row);返回值:virtual unsigned int参数:类型参数名说明CATableViewtable当前tableViewunsigned intsectioncell所属的区域unsigned introwcell所在行数解释:获取指定的cell高度virtual unsigned int numberOfRowsInSection(CATableView* table, unsigned int section);返回值:virtual unsigned int参数:类型参数名说明CATableViewtable当前tableViewunsigned intsectioncell所属的区域解释:获取对应的section所包含的cell个数virtual unsigned int numberOfSections(CATableView* table);返回值:virtual unsigned int参数:类型参数名说明CATableView*table当前tableView解释:获取section个数virtual CAView* tableViewSectionViewForHeaderInSection(CATableView* table, const DSize& viewSize, unsigned int section);返回值:virtual CAView*参数:类型参数名说明CATableView*table当前tableViewconst DSize&viewSize视图大小unsigned intsectioncell所属的区域解释:在tableView中通过索引获取头部Sectionvirtual unsigned int tableViewHeightForHeaderInSection(CATableView* table, unsigned int section);返回值:virtual unsigned int参数:类型参数名说明CATabl

上一页  [1] [2] [3] [4] [5]  下一页


CATableView(表单视图)