Skip to content
9miao edited this page Oct 10, 2014 · 2 revisions

CAListView

Class Description

Lite version tableView that supports horizontal and longitudinal sliding.

Effect Picture


Base Class

CAScrollView

Attribute

Access modifier

Attribute name

Description

protected

ListViewOrientation

listView’s scrolling direction

protected

ListViewDataSource

data delegate

protected

ListViewDelegate

 touch event agent

private

ListHeaderView

header view

private

ListFooterView

footer view

protected

SeparatorColor

cell’s separator color

protected

ListHeaderHeight

header view’s height

protected

ListFooterHeight

footer view’s height

protected

SeparatorViewHeight

separator height

protected

AllowsSelection

allowed to be selected or not

protected

AllowsMultipleSelection

allowed to be multiple seclected or not

Method

Access modifier

Method name

Description

public

reloadViewSizeData

reload listView’s size related data

public

reloadData

set current selected item

public

setSelectAtIndex

set current selected cell

Public

dequeueReusableCellWithIdentifier

Search designated identifier’s cell from reuse queue

Attribute Description

ListViewOrientation
Type: CAListViewOrientation
Descripiton: listView’s scrolling direction, enumeration type including horizontal and vertical directions, public get/set{}.

ListViewDataSource
Type: CAListViewDataSource
Descripiton: listView’s data delegate, public get/set{}.

ListViewDelegate
Type: CAListViewDelegate
Descripiton: listView’s click event delegate, including selected and deselected, public get/set{}.

ListHeaderView
Type: CAView
Descripiton: listView’s header, public get/set{}.

ListFooterView
Type: CAView
Descripiton: listView’s footer, public get/set{}.

SeparatorColor
Type: CAColor4B
Descripiton: separator color between cells, public get/set{}.

ListHeaderHeight
Type: unsigned int
Descripiton: header view height, public get/set{}.

ListFooterHeight
Type: unsigned int
Descripiton: footer view height, public get/set{}.

SeparatorViewHeight
Type: unsigned int
Descripiton: separator height, public get/set{}.

AllowsSelection
Type: bool
Descripiton: cell is allowed to be selected or not, public get/set{}.

AllowsMultipleSelection
Type: bool
Descripiton: multiple selection is allowed or not, and multiple selection is only valid in selected-allowed condition, public get/set{}.

Method Description

void reloadViewSizeData()
Return value: void
Descripiton: reload listView’s size related data

void reloadData()
Return value: void
Descripiton: refresh listView

void setSelectAtIndex(unsigned int index)
Return value: void
Parameter:

Type

Parameter name

Description

unsigned int index

index

Cell’s index value

Descripiton: set current selected cell according to index value

CAListViewCell dequeueReusableCellWithIdentifier(const char reuseIdentifier)*
Return value: CAListViewCell

Parameter:

Type

Parameter name

Description

const char*

reuseIdentifier

Reuse identifier

Descripiton: research designated identifier’s cell from reuse queue, and return NULL if cell does not exist.
Clone this wiki locally