-
Notifications
You must be signed in to change notification settings - Fork 421
CANavigationBar
NavigationBar control that is subordinated to CANavigationController. Generally CANavigationBar does not work alone but controlled by navigationController to implement App hierarchical structure.
CAView
Access modifier |
Attribute name |
Description |
protected |
BackGroundImage |
background image |
protected |
TitleColor |
title color |
protected |
ButtonColor |
button color |
protected |
Delegate |
Delegate |
protected |
Items |
sub item array |
Access modifier |
Method name |
Description |
public |
create |
create a navigationBar
|
public |
pushItem |
Push navigationBarItem into stack
|
public |
popitem |
Act pop stack operation on navigationBarItem |
public |
init |
initialization
|
public
|
replaceItemAtIndex |
replace navigationBarItem according to index value |
BackGroundImage
Type: CAImage*
Descripiton: set navigationBar’s background image
Example:
navigationController->getNavigationBar()->setBackGroundImage(CAImage: : create("ex1. png"));
TitleColor
Type: CAColor4B
Descripiton: title color
ButtonColor
Type: CAColor4B
Descripiton: button color on navigation bar
Delegate
Type: CANavigationBarDelegate*
Descripiton: navigationBar’s delegate
Items
Type: vector<CANavigationBarItem*>
Descripiton: array that stores navigationBarItem
static CANavigationBar create()*
Return value: CANavigation*
void pushItem(CANavigationBarItem item)*
Return value: void
Parameter:
Type |
Parameter name |
Description |
CANavigationBarItem* |
item |
navigationBar’s sub item |
void popItem()
Return value: void
Descripiton: remove navigationBarItem from stack top via push stack operation.
virtual bool init()
Return value: bool
Descripiton: Internal calls by default in create method and initialize navigationBar.
void replaceItemAtIndex(size_t index, CANavigationBarItem item)*
Return value: void
Parameter:
Type |
Parameter name |
Description |
size_t |
index |
frame index |
CANavigationBarItem* |
item |
sub item |