public class UIBarButtonItem extends UIBarItem
| Constructor and Description |
|---|
UIBarButtonItem(int UIBarButtonSystemItem,
Runnable action)
Initializes a new item containing the specified system item.
|
UIBarButtonItem(String title,
int UIBarButtonItemStyle,
Runnable action)
Constructs a bar button item with the specified title,style and connects
it with a particular delegate.
|
UIBarButtonItem(UIImage image,
int UIBarButtonItemStyle,
Runnable action)
Constructs a bar button item with the specified image,style and connects
it with a particular delegate.
|
UIBarButtonItem(UIView customview)
Constructs a bar button item with the specified custom view.
|
| Modifier and Type | Method and Description |
|---|---|
UIView |
customView()
Returns a custom view for this bar button item.
|
Set<String> |
possibleTitles()
Returns the set of the possible titles of this bar button item.
|
void |
setCustomView(UIView customView)
Sets a custom view for this bar button item.
|
void |
setPossibleTitles(Set<String> possibleTitles)
Sets the possible titles of this bar button item.
|
void |
setStyle(int style)
Sets the style for this bar button item.
|
void |
setTarget(Runnable target)
Sets the object related to this item's action.
|
void |
setWidth(double width)
Set the width for this UIBarButtonItem.
|
int |
style()
Returns the style of this bar button item.
|
Runnable |
target()
Returns the object related to this item's action.
|
double |
width()
Returns the width of this UIBarButtonItem.
|
image, imageInsets, isEnabled, setEnabled, setImage, setImageInsets, setTag, setTitle, tag, titleaddObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKeypublic UIBarButtonItem(int UIBarButtonSystemItem,
Runnable action)
UIBarButtonSystemItem - The system item to use as the first item on
the bar. One of the constants defined in UIBarButtonSystemItem.action - The action to send to target when this item is selected.UIBarButtonItemStylepublic UIBarButtonItem(UIView customview)
customview - A custom view for the bar button item.public UIBarButtonItem(UIImage image, int UIBarButtonItemStyle, Runnable action)
image - The item’s image. If NULL then no image displayed.UIBarButtonItemStyle - The style of the item.action - The delegate for this bar button item.UIBarButtonItemStylepublic UIBarButtonItem(String title, int UIBarButtonItemStyle, Runnable action)
title - The item’s title. If NULL then no title displayed.UIBarButtonItemStyle - The style of the item.action - The delegate for this bar button item.UIBarButtonItemStylepublic UIView customView()
public void setCustomView(UIView customView)
customView - A custom view for this bar button item..public Set<String> possibleTitles()
public void setPossibleTitles(Set<String> possibleTitles)
possibleTitles - The possible titles of this bar button item.public int style()
public void setStyle(int style)
style - The style for this bar button item.UIBarButtonItemStylepublic Runnable target()
public void setTarget(Runnable target)
target - The object related to this item's action.public double width()
public void setWidth(double width)
width - The width of this UIBarButtonItem.Copyright © 2020. All rights reserved.