Skip to content

CANavigationBarItem

9miao edited this page Sep 19, 2014 · 2 revisions

CANavigationBarItem

Class Description

Every viewController has a navigationBarItem that is used to identify current veiwController in navigationBar.

Base Class

CABarItem

Attribute

Access modifier

Attribute name

Description

private

TitleView

title view

private

TitleViewImage

title image

protected

LeftButtonItems

left button array on navigation bar

protected

RightButtonItems

right button array on navigation bar

protected

ShowGoBackButton

show return button or not

Method

Access modifier

Method name

Description

public

create

factory method, create a navigationBarItem

public

addLeftButtonItem

add a custom button on the left of navigationBar

public

addRightButtonItem

add a custom button on the right of navigationBar

Attribute Description

TitleView
Type: CAView*
Descripiton: use view to set title, get/set{}.

TitleViewImage
Type: CAImage*
Descripiton: use image to set title, get/set{}.

LeftButtonItems
Type: CCArray*
Descripiton: left added button’s array of records on navigationBar, read-only property.

RightButtonItems
Type: CCArray*
Descripiton: right added button’s array of records on navigationBar, read-only property.

ShowGoBackButton
Type: bool
Descripiton: hide return button which is auto generated on navigationBar left or not, is/set{}.

Method Description

static CANavigationBarItem create(std: : string title)*
Return value: CANavigationBarItem*
Parameter:

Type

Parameter name

Description

string

title

title

Descripiton: create a navigationBarIiem and designate displayed title.

void addLeftButtonItem(CABarButtonItem item)*
Return value: void
Parameter:

Type

Parameter name

Description

CABarButtonItem*

item

custom button

Descripiton: customize left button of navigation bar via transferred item parameter.

void addRightButtonItem(CABarButtonItem item)*
Return value: void
Parameter:

Type

Parameter name

Description

CABarButtonItem*

item

custom button

Descripiton: customize right button of navigation bar via transferred item parameter.
Clone this wiki locally