public class UIBarButtonItem extends UIBarItem implements NSCoding, UISpringLoadedInteractionSupporting
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
UIBarButtonItem(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
UIBarButtonItem |
_appearance()
To customize the appearance of all instances of a class, send the relevant appearance modification messages to the appearance proxy for the class.
|
UIBarButtonItem |
_appearanceForTraitCollection(UITraitCollection trait) |
UIBarButtonItem |
_appearanceForTraitCollectionWhenContainedIn(UITraitCollection trait,
UIAppearanceContainer ContainerClass,
java.lang.Object... varargs)
Deprecated.
|
UIBarButtonItem |
_appearanceForTraitCollectionWhenContainedInInstancesOfClasses(UITraitCollection trait,
NSArray<?> containerTypes) |
UIBarButtonItem |
_appearanceWhenContainedIn(UIAppearanceContainer ContainerClass,
java.lang.Object... varargs)
Deprecated.
|
UIBarButtonItem |
_appearanceWhenContainedInInstancesOfClasses(NSArray<?> containerTypes) |
static boolean |
accessInstanceVariablesDirectly() |
org.moe.natj.objc.SEL |
action()
default is NULL
|
static UIBarButtonItem |
alloc() |
static UIBarButtonItem |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static UIBarButtonItem |
appearance() |
static UIBarButtonItem |
appearanceForTraitCollection(UITraitCollection trait) |
static UIBarButtonItem |
appearanceForTraitCollectionWhenContainedIn(UITraitCollection trait,
UIAppearanceContainer ContainerClass,
java.lang.Object... varargs)
Deprecated.
|
static UIBarButtonItem |
appearanceForTraitCollectionWhenContainedInInstancesOfClasses(UITraitCollection trait,
NSArray<?> containerTypes) |
static UIBarButtonItem |
appearanceWhenContainedIn(UIAppearanceContainer ContainerClass,
java.lang.Object... varargs)
Deprecated.
|
static UIBarButtonItem |
appearanceWhenContainedInInstancesOfClasses(NSArray<?> containerTypes) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
UIImage |
backButtonBackgroundImageForStateBarMetrics(long state,
long barMetrics) |
double |
backButtonBackgroundVerticalPositionAdjustmentForBarMetrics(long barMetrics) |
UIOffset |
backButtonTitlePositionAdjustmentForBarMetrics(long barMetrics) |
UIImage |
backgroundImageForStateBarMetrics(long state,
long barMetrics) |
UIImage |
backgroundImageForStateStyleBarMetrics(long state,
long style,
long barMetrics) |
double |
backgroundVerticalPositionAdjustmentForBarMetrics(long barMetrics) |
UIBarButtonItemGroup |
buttonGroup()
The group that the UIBarButtonItem is currently associated with, either as a member of the barButtonItems array or as that group's representativeItem.
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
boolean |
changesSelectionAsPrimaryAction()
Indicates if the button changes selection as its primary action.
|
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
UIView |
customView()
default is nil
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
encodeWithCoder(NSCoder coder) |
static UIBarButtonItem |
fixedSpaceItemOfWidth(double width)
Construct a new fixed space item with the given width.
|
static UIBarButtonItem |
flexibleSpaceItem()
Construct a new flexible space item.
|
static long |
hash_static() |
UIBarButtonItem |
init() |
UIBarButtonItem |
initWithBarButtonSystemItemMenu(long systemItem,
UIMenu menu)
Creates a bar button item for the given systemItem.
|
UIBarButtonItem |
initWithBarButtonSystemItemPrimaryAction(long systemItem,
UIAction primaryAction)
Creates a bar button item for the given systemItem.
|
UIBarButtonItem |
initWithBarButtonSystemItemTargetAction(long systemItem,
java.lang.Object target,
org.moe.natj.objc.SEL action) |
UIBarButtonItem |
initWithCoder(NSCoder coder)
NS_DESIGNATED_INITIALIZER
|
UIBarButtonItem |
initWithCustomView(UIView customView) |
UIBarButtonItem |
initWithImageLandscapeImagePhoneStyleTargetAction(UIImage image,
UIImage landscapeImagePhone,
long style,
java.lang.Object target,
org.moe.natj.objc.SEL action)
landscapeImagePhone will be used for the bar button image when the bar has Compact or Condensed bar metrics.
|
UIBarButtonItem |
initWithImageMenu(UIImage image,
UIMenu menu)
Creates a plain-style bar button item with the given item.
|
UIBarButtonItem |
initWithImageStyleTargetAction(UIImage image,
long style,
java.lang.Object target,
org.moe.natj.objc.SEL action) |
UIBarButtonItem |
initWithPrimaryAction(UIAction primaryAction)
Creates a plain-style bar button item from the properties of primaryAction.
|
UIBarButtonItem |
initWithTitleMenu(java.lang.String title,
UIMenu menu)
Creates a plain-style bar button item with the given title.
|
UIBarButtonItem |
initWithTitleStyleTargetAction(java.lang.String title,
long style,
java.lang.Object target,
org.moe.natj.objc.SEL action) |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isSelected() |
boolean |
isSpringLoaded() |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
UIMenu |
menu()
When non-nil the menu is presented, the gesture used to trigger the menu is based on if the bar button item would normally trigger an action when tapped.
|
static UIBarButtonItem |
new_objc() |
NSSet<java.lang.String> |
possibleTitles()
default is nil
|
UIAction |
primaryAction()
Set the primaryAction on this item, updating the title & image of the item if appropriate (primaryAction is non-nil, and this is not a system item).
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setAction(org.moe.natj.objc.SEL value)
default is NULL
|
void |
setBackButtonBackgroundImageForStateBarMetrics(UIImage backgroundImage,
long state,
long barMetrics)
The remaining appearance modifiers apply solely to UINavigationBar back buttons and are ignored by other buttons.
|
void |
setBackButtonBackgroundVerticalPositionAdjustmentForBarMetrics(double adjustment,
long barMetrics)
For adjusting the vertical centering of bordered bar buttons within the bar
|
void |
setBackButtonTitlePositionAdjustmentForBarMetrics(UIOffset adjustment,
long barMetrics) |
void |
setBackgroundImageForStateBarMetrics(UIImage backgroundImage,
long state,
long barMetrics)
In general, you should specify a value for the normal state to be used by other states which don't have a custom value set.
|
void |
setBackgroundImageForStateStyleBarMetrics(UIImage backgroundImage,
long state,
long style,
long barMetrics)
This sets the background image for buttons with a specific style.
|
void |
setBackgroundVerticalPositionAdjustmentForBarMetrics(double adjustment,
long barMetrics)
For adjusting the vertical centering of bordered bar buttons within the bar
|
void |
setChangesSelectionAsPrimaryAction(boolean value)
Indicates if the button changes selection as its primary action.
|
void |
setCustomView(UIView value)
default is nil
|
void |
setMenu(UIMenu value)
When non-nil the menu is presented, the gesture used to trigger the menu is based on if the bar button item would normally trigger an action when tapped.
|
void |
setPossibleTitles(NSSet<java.lang.String> value)
default is nil
|
void |
setPrimaryAction(UIAction value)
Set the primaryAction on this item, updating the title & image of the item if appropriate (primaryAction is non-nil, and this is not a system item).
|
void |
setSelected(boolean value) |
void |
setSpringLoaded(boolean value) |
void |
setStyle(long value)
default is UIBarButtonItemStylePlain
|
void |
setTarget_unsafe(java.lang.Object value)
default is nil
|
void |
setTarget(java.lang.Object value)
default is nil
|
void |
setTintColor(UIColor value) |
void |
setTitlePositionAdjustmentForBarMetrics(UIOffset adjustment,
long barMetrics)
For adjusting the position of a title (if any) within a bordered bar button
|
static void |
setVersion_static(long aVersion) |
void |
setWidth(double value)
default is 0.0
|
long |
style()
default is UIBarButtonItemStylePlain
|
static org.moe.natj.objc.Class |
superclass_static() |
java.lang.Object |
target()
default is nil
|
UIColor |
tintColor() |
UIOffset |
titlePositionAdjustmentForBarMetrics(long barMetrics) |
static long |
version_static() |
double |
width()
default is 0.0
|
accessibilityIdentifier, image, imageInsets, isEnabled, landscapeImagePhone, landscapeImagePhoneInsets, largeContentSizeImage, largeContentSizeImageInsets, setAccessibilityIdentifier, setEnabled, setImage, setImageInsets, setLandscapeImagePhone, setLandscapeImagePhoneInsets, setLargeContentSizeImage, setLargeContentSizeImageInsets, setTag, setTitle, setTitleTextAttributesForState, tag, title, titleTextAttributesForStateaccessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static UIBarButtonItem alloc()
public static UIBarButtonItem allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static UIBarButtonItem appearance()
public static UIBarButtonItem appearanceForTraitCollection(UITraitCollection trait)
@Deprecated public static UIBarButtonItem appearanceForTraitCollectionWhenContainedIn(UITraitCollection trait, UIAppearanceContainer ContainerClass, java.lang.Object... varargs)
public static UIBarButtonItem appearanceForTraitCollectionWhenContainedInInstancesOfClasses(UITraitCollection trait, NSArray<?> containerTypes)
@Deprecated public static UIBarButtonItem appearanceWhenContainedIn(UIAppearanceContainer ContainerClass, java.lang.Object... varargs)
public static UIBarButtonItem appearanceWhenContainedInInstancesOfClasses(NSArray<?> containerTypes)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static UIBarButtonItem new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public org.moe.natj.objc.SEL action()
public UIBarButtonItem _appearance()
UIAppearanceNote for iOS7: On iOS7 the tintColor property has moved to UIView, and now has special inherited behavior described in UIView.h. This inherited behavior can conflict with the appearance proxy, and therefore tintColor is now disallowed with the appearance proxy.
_appearance in interface UIAppearance_appearance in class UIBarItempublic UIBarButtonItem _appearanceForTraitCollection(UITraitCollection trait)
_appearanceForTraitCollection in interface UIAppearance_appearanceForTraitCollection in class UIBarItem@Deprecated public UIBarButtonItem _appearanceForTraitCollectionWhenContainedIn(UITraitCollection trait, UIAppearanceContainer ContainerClass, java.lang.Object... varargs)
_appearanceForTraitCollectionWhenContainedIn in interface UIAppearance_appearanceForTraitCollectionWhenContainedIn in class UIBarItempublic UIBarButtonItem _appearanceForTraitCollectionWhenContainedInInstancesOfClasses(UITraitCollection trait, NSArray<?> containerTypes)
_appearanceForTraitCollectionWhenContainedInInstancesOfClasses in interface UIAppearance_appearanceForTraitCollectionWhenContainedInInstancesOfClasses in class UIBarItem@Deprecated public UIBarButtonItem _appearanceWhenContainedIn(UIAppearanceContainer ContainerClass, java.lang.Object... varargs)
UIAppearance[[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[UISplitViewController class]]] setBarTintColor:myColor]; [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[UITabBarController class], [UISplitViewController class]]] setBarTintColor:myTabbedNavBarColor];
In any given view hierarchy the outermost appearance proxy wins. Specificity (depth of the chain) is the tie-breaker.
In other words, the containment statement is treated as a partial ordering. Given a concrete ordering (actual subview hierarchy), we select the partial ordering that is the first unique match when reading the actual hierarchy from the window down.
_appearanceWhenContainedIn in interface UIAppearance_appearanceWhenContainedIn in class UIBarItempublic UIBarButtonItem _appearanceWhenContainedInInstancesOfClasses(NSArray<?> containerTypes)
_appearanceWhenContainedInInstancesOfClasses in interface UIAppearance_appearanceWhenContainedInInstancesOfClasses in class UIBarItempublic UIImage backButtonBackgroundImageForStateBarMetrics(long state, long barMetrics)
public double backButtonBackgroundVerticalPositionAdjustmentForBarMetrics(long barMetrics)
public UIOffset backButtonTitlePositionAdjustmentForBarMetrics(long barMetrics)
public UIImage backgroundImageForStateBarMetrics(long state, long barMetrics)
public UIImage backgroundImageForStateStyleBarMetrics(long state, long style, long barMetrics)
public double backgroundVerticalPositionAdjustmentForBarMetrics(long barMetrics)
public UIBarButtonItemGroup buttonGroup()
public UIView customView()
public void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingencodeWithCoder in class UIBarItempublic UIBarButtonItem init()
public UIBarButtonItem initWithBarButtonSystemItemTargetAction(long systemItem, java.lang.Object target, org.moe.natj.objc.SEL action)
public UIBarButtonItem initWithCoder(NSCoder coder)
NSCodinginitWithCoder in interface NSCodinginitWithCoder in class UIBarItempublic UIBarButtonItem initWithCustomView(UIView customView)
public UIBarButtonItem initWithImageLandscapeImagePhoneStyleTargetAction(UIImage image, UIImage landscapeImagePhone, long style, java.lang.Object target, org.moe.natj.objc.SEL action)
public UIBarButtonItem initWithImageStyleTargetAction(UIImage image, long style, java.lang.Object target, org.moe.natj.objc.SEL action)
public UIBarButtonItem initWithTitleStyleTargetAction(java.lang.String title, long style, java.lang.Object target, org.moe.natj.objc.SEL action)
public NSSet<java.lang.String> possibleTitles()
public void setAction(org.moe.natj.objc.SEL value)
public void setBackButtonBackgroundImageForStateBarMetrics(UIImage backgroundImage, long state, long barMetrics)
public void setBackButtonBackgroundVerticalPositionAdjustmentForBarMetrics(double adjustment,
long barMetrics)
public void setBackButtonTitlePositionAdjustmentForBarMetrics(UIOffset adjustment, long barMetrics)
public void setBackgroundImageForStateBarMetrics(UIImage backgroundImage, long state, long barMetrics)
Similarly, when a property is dependent on the bar metrics (on the iPhone in landscape orientation, bars have a different height from standard), be sure to specify a value for UIBarMetricsDefault.
This sets the background image for buttons of any style.
public void setBackgroundImageForStateStyleBarMetrics(UIImage backgroundImage, long state, long style, long barMetrics)
public void setBackgroundVerticalPositionAdjustmentForBarMetrics(double adjustment,
long barMetrics)
public void setCustomView(UIView value)
public void setPossibleTitles(NSSet<java.lang.String> value)
public void setStyle(long value)
public void setTarget_unsafe(java.lang.Object value)
public void setTarget(java.lang.Object value)
public void setTintColor(UIColor value)
public void setTitlePositionAdjustmentForBarMetrics(UIOffset adjustment, long barMetrics)
public void setWidth(double value)
public long style()
public java.lang.Object target()
public UIColor tintColor()
public UIOffset titlePositionAdjustmentForBarMetrics(long barMetrics)
public double width()
public boolean isSpringLoaded()
isSpringLoaded in interface UISpringLoadedInteractionSupportingpublic void setSpringLoaded(boolean value)
setSpringLoaded in interface UISpringLoadedInteractionSupportingpublic static UIBarButtonItem fixedSpaceItemOfWidth(double width)
public static UIBarButtonItem flexibleSpaceItem()
public UIBarButtonItem initWithBarButtonSystemItemMenu(long systemItem, UIMenu menu)
public UIBarButtonItem initWithBarButtonSystemItemPrimaryAction(long systemItem, UIAction primaryAction)
public UIBarButtonItem initWithImageMenu(UIImage image, UIMenu menu)
public UIBarButtonItem initWithPrimaryAction(UIAction primaryAction)
public UIBarButtonItem initWithTitleMenu(java.lang.String title, UIMenu menu)
public UIMenu menu()
public UIAction primaryAction()
public void setMenu(UIMenu value)
public void setPrimaryAction(UIAction value)
public boolean changesSelectionAsPrimaryAction()
public boolean isSelected()
public void setChangesSelectionAsPrimaryAction(boolean value)
public void setSelected(boolean value)