-
Notifications
You must be signed in to change notification settings - Fork 412
CABarButtonItem
custom navigation bar button, it assists navigationBarItem functionality implementation.
CABarItem
|
Access modifier |
Attribute name |
Description |
|
public |
HighlightedImage |
image in highlight condition |
|
public |
Target |
callback funciton |
|
Access modifier |
Method name |
Description |
|
public |
create |
factory method, create a barButtonItem |
|
public |
setTarget |
set button’s click event |
|
public |
getTarget |
obtain the target of click event |
|
public |
getSel |
obtain callback of click event |
HighlightedImage
Type: CAImage*
Descripiton: image in highlight condition when clicking button
Target
Type: SEL_CAControl
Descripiton: callback event of button
static CABarButtonItem create(std: : string title, CAImage image, CAImage* highlightedImage)**
Return value: CABarButtonItem*
Parameter name
|
Type |
Parameter name |
Description |
|
string |
title |
button title |
|
CAImage* |
image |
image in button’s normal condition |
|
CAImage* |
highlightedImage |
image in button’s clicked condition |
void setTarget(CCObject target, SEL_CAControl callfunc)*
Return value: void
Parameter name
|
Type |
Parameter name |
Description |
|
CCObject* |
target |
current object |
|
SEL_CAControl |
callfunc |
function callback of button click event |
CCObject getTarget()*
Return value: CCObject*
Descripiton: obtain current object
SEL_CAControl getSel()
Return value: SEL_CAControl
Descripiton: obtain callback funciton of button’s click event