Package org.robovm.apple.uikit
Class UIButton
- All Implemented Interfaces:
CALayerDelegate,NSCoding,NSObjectProtocol,UIAccessibilityContentSizeCategoryImageAdjusting,UIAccessibilityIdentification,UIActivityItemsConfigurationProviding,UIAppearanceContainer,UIContextMenuInteractionDelegate,UICoordinateSpace,UIDynamicItem,UIFocusEnvironment,UIFocusItem,UIFocusItemContainer,UILargeContentViewerItem,UIPasteConfigurationSupporting,UIResponderStandardEditActions,UISpringLoadedInteractionSupporting,UITraitEnvironment,UIUserActivityRestoring,ObjCProtocol
- Direct Known Subclasses:
INUIAddVoiceShortcutButton,PKAddPassButton,PKPaymentButton
public class UIButton extends UIControl implements NSCoding, UISpringLoadedInteractionSupporting, UIAccessibilityContentSizeCategoryImageAdjusting
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUIButton.UIButtonPtrNested classes/interfaces inherited from class org.robovm.apple.uikit.UIControl
UIControl.Listener, UIControl.OnEditingChangedListener, UIControl.OnEditingDidBeginListener, UIControl.OnEditingDidEndListener, UIControl.OnEditingDidEndOnExitListener, UIControl.OnPrimaryActionTriggeredListener, UIControl.OnTouchCancelListener, UIControl.OnTouchDownListener, UIControl.OnTouchDownRepeatListener, UIControl.OnTouchDragEnterListener, UIControl.OnTouchDragExitListener, UIControl.OnTouchDragInsideListener, UIControl.OnTouchDragOutsideListener, UIControl.OnTouchUpInsideListener, UIControl.OnTouchUpOutsideListener, UIControl.OnValueChangedListener, UIControl.UIControlPtrNested classes/interfaces inherited from class org.robovm.apple.uikit.UIView
UIView.UIViewPtrNested classes/interfaces inherited from class org.robovm.apple.uikit.UIResponder
UIResponder.UIResponderPtrNested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInitNested classes/interfaces inherited from class org.robovm.objc.ObjCObject
ObjCObject.ObjCObjectPtr, ObjCObject.Super -
Field Summary
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAINFields inherited from class org.robovm.objc.ObjCObject
customClass -
Constructor Summary
Constructors Modifier Constructor Description UIButton()UIButton(CGRect frame)UIButton(CGRect frame, UIAction primaryAction)UIButton(NSCoder coder)protectedUIButton(NSObject.Handle h, long handle)protectedUIButton(NSObject.SkipInit skipInit)UIButton(UIButtonConfiguration configuration, UIAction primaryAction)UIButton(UIButtonType buttonType)UIButton(UIButtonType buttonType, UIAction primaryAction) -
Method Summary
Methods inherited from class org.robovm.apple.uikit.UIControl
addAction, addOnEditingChangedListener, addOnEditingDidBegin, addOnEditingDidEndListener, addOnEditingDidEndOnExitListener, addOnPrimaryActionTriggeredListener, addOnTouchCancelListener, addOnTouchDownListener, addOnTouchDownRepeatListener, addOnTouchDragEnterListener, addOnTouchDragExitListener, addOnTouchDragInsideListener, addOnTouchDragOutsideListener, addOnTouchUpInsideListener, addOnTouchUpOutsideListener, addOnValueChangedListener, addTarget, beginTracking, cancelTracking, continueTracking, endTracking, enumerateEventHandlers, getActions, getAllControlEvents, getAllTargets, getConfiguration, getContentHorizontalAlignment, getContentVerticalAlignment, getContextMenuInteraction, getEffectiveContentHorizontalAlignment, getPreviewForDismissingMenu, getPreviewForHighlightingMenu, getState, getToolTip, getToolTipInteraction, isContextMenuInteractionEnabled, isEnabled, isHighlighted, isSelected, isTouchInside, isTracking, menuAttachmentPointForConfiguration, removeAction, removeAction, removeListener, removeTarget, sendAction, sendAction, sendControlEventsActions, setContentHorizontalAlignment, setContentVerticalAlignment, setContextMenuInteractionEnabled, setEnabled, setHighlighted, setSelected, setShowsMenuAsPrimaryAction, setToolTip, showsMenuAsPrimaryAction, willDisplayMenu, willEnd, willPerformPreviewActionMethods inherited from class org.robovm.apple.uikit.UIView
addConstraint, addConstraints, addGestureRecognizer, addInteraction, addKeyframe, addLayoutGuide, addMotionEffect, addSubview, animate, animate, animate, animate, animateKeyframes, areAnimationsEnabled, autoresizesSubviews, beginAnimations, bringSubviewToFront, canBecomeFocused, clearsContextBeforeDrawing, clipsToBounds, commitAnimations, convertPointFromCoordinateSpace, convertPointFromView, convertPointToCoordinateSpace, convertPointToView, convertRectFromCoordinateSpace, convertRectFromView, convertRectToCoordinateSpace, convertRectToView, decodeRestorableState, didAddSubview, didHintFocusMovement, didMoveToSuperview, didMoveToWindow, didUpdateFocus, displayLayer, draw, draw, drawLayer, drawViewHierarchy, encode, encodeRestorableState, endEditing, exchangeSubview, exerciseAmbiguityInLayout, focusItemsInRect, gestureRecognizerShouldBegin, getAccessibilityIdentifier, getAction, getAlignmentRectForFrame, getAlignmentRectInsets, getAlpha, getAppliedContentSizeCategoryLimitsDescription, getAutoresizingMask, getBackgroundColor, getBottomAnchor, getBounds, getCenter, getCenterXAnchor, getCenterYAnchor, getCollisionBoundingPath, getCollisionBoundsType, getConstraints, getConstraintsAffectingLayout, getContentCompressionResistancePriority, getContentHuggingPriority, getContentMode, getContentScaleFactor, getCoordinateSpace, getDirectionalLayoutMargins, getEffectiveUserInterfaceLayoutDirection, getFirstBaselineAnchor, getFocusEffect, getFocusGroupIdentifier, getFocusGroupPriority, getFocusItemContainer, getFrame, getFrameForAlignmentRect, getGestureRecognizers, getHeightAnchor, getInheritedAnimationDuration, getInteractions, getIntrinsicContentSize, getKeyboardLayoutGuide, getLargeContentImage, getLargeContentImageInsets, getLargeContentTitle, getLastBaselineAnchor, getLayer, getLayoutGuides, getLayoutMargins, getLayoutMarginsGuide, getLeadingAnchor, getLeftAnchor, getMaskView, getMaximumContentSizeCategory, getMinimumContentSizeCategory, getMotionEffects, getOverrideUserInterfaceStyle, getParentFocusEnvironment, getPreferredFocusedView, getPreferredFocusEnvironments, getReadableContentGuide, getResizableSnapshot, getRestorationIdentifier, getRightAnchor, getSafeAreaInsets, getSafeAreaLayoutGuide, getSemanticContentAttribute, getSizeThatFits, getSnapshot, getSubviews, getSuperview, getSystemLayoutSizeFittingSize, getSystemLayoutSizeFittingSize, getTag, getTintAdjustmentMode, getTopAnchor, getTrailingAnchor, getTraitCollection, getTransform, getTransform3D, getViewForBaselineLayout, getViewForFirstBaselineLayout, getViewForLastBaselineLayout, getViewPrintFormatter, getViewWithTag, getWidthAnchor, getWindow, hasAmbiguousLayout, hitTest, insertSubview, insertSubviewAbove, insertSubviewBelow, invalidateIntrinsicContentSize, isAccessibilityIgnoresInvertColors, isDescendantOf, isExclusiveTouch, isFocused, isHidden, isInsetsLayoutMarginsFromSafeArea, isMultipleTouchEnabled, isOpaque, isPointInside, isScalesLargeContentImage, isTransparentFocusItem, isUserInteractionEnabled, layoutIfNeeded, layoutMarginsDidChange, layoutSublayers, layoutSubviews, modifyAnimations, needsUpdateConstraints, NoIntrinsicMetric, performSystemAnimation, performWithoutAnimation, preservesSuperviewLayoutMargins, removeConstraint, removeConstraints, removeFromSuperview, removeGestureRecognizer, removeInteraction, removeLayoutGuide, removeMotionEffect, requiresConstraintBasedLayout, safeAreaInsetsDidChange, sendSubviewToBack, setAccessibilityIdentifier, setAccessibilityIgnoresInvertColors, setAlpha, setAnimationBeginsFromCurrentState, setAnimationCurve, setAnimationDelay, setAnimationDelegate, setAnimationDidStopSelector, setAnimationDurationInSeconds, setAnimationRepeatAutoreverses, setAnimationRepeatCount, setAnimationsEnabled, setAnimationStartDate, setAnimationTransition, setAnimationWillStartSelector, setAutoresizesSubviews, setAutoresizingMask, setBackgroundColor, setBounds, setCenter, setClearsContextBeforeDrawing, setClipsToBounds, setContentCompressionResistancePriority, setContentHuggingPriority, setContentMode, setContentScaleFactor, setDirectionalLayoutMargins, setExclusiveTouch, setFocusEffect, setFocusGroupIdentifier, setFocusGroupPriority, setFrame, setGestureRecognizers, setHidden, setInsetsLayoutMarginsFromSafeArea, setInteractions, setLargeContentImage, setLargeContentImageInsets, setLargeContentTitle, setLayoutMargins, setMaskView, setMaximumContentSizeCategory, setMinimumContentSizeCategory, setMotionEffects, setMultipleTouchEnabled, setNeedsDisplay, setNeedsDisplay, setNeedsFocusUpdate, setNeedsLayout, setNeedsUpdateConstraints, setOpaque, setOverrideUserInterfaceStyle, setPreservesSuperviewLayoutMargins, setRestorationIdentifier, setScalesLargeContentImage, setSemanticContentAttribute, setShowsLargeContentViewer, setTag, setTintAdjustmentMode, setTransform, setTransform3D, setTranslatesAutoresizingMaskIntoConstraints, setUserInteractionEnabled, shouldUpdateFocus, showsLargeContentViewer, sizeToFit, tintColorDidChange, traitCollectionDidChange, transition, transition, translatesAutoresizingMaskIntoConstraints, updateConstraints, updateConstraintsIfNeeded, updateFocusIfNeeded, willDrawLayer, willMoveToSuperview, willMoveToWindow, willRemoveSubviewMethods inherited from class org.robovm.apple.uikit.UIResponder
becomeFirstResponder, buildMenu, canBecomeFirstResponder, canPasteItemProviders, canPerformAction, canResignFirstResponder, captureTextFromCamera, clearTextInputContextIdentifier, copy, cut, decreaseSize, delete, getActionTarget, getActivityItemsConfiguration, getEditingInteractionConfiguration, getInputAccessoryView, getInputAccessoryViewController, getInputAssistantItem, getInputView, getInputViewController, getKeyCommands, getNextResponder, getPasteConfiguration, getTextInputContextIdentifier, getTextInputMode, getUndoManager, getUserActivity, increaseSize, isFirstResponder, makeTextWritingDirectionLeftToRight, makeTextWritingDirectionRightToLeft, motionBegan, motionCancelled, motionEnded, paste, pasteAndGo, pasteAndMatchStyle, pasteAndSearch, pasteItemProviders, pressesBegan, pressesCancelled, pressesChanged, pressesEnded, print, reloadInputViews, remoteControlReceived, resignFirstResponder, restoreUserActivityState, select, selectAll, setActivityItemsConfiguration, setPasteConfiguration, setUserActivity, toggleBoldface, toggleItalics, toggleUnderline, touchesBegan, touchesCancelled, touchesEnded, touchesEstimatedPropertiesUpdated, touchesMoved, updateTextAttributes, updateUserActivityState, validateCommandMethods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValuesMethods inherited from class org.robovm.objc.ObjCObject
addStrongRef, dispose, dispose, finalize, getAssociatedObject, getObjCClass, getPeerObject, getSuper, initObject, logRetainRelease, removeStrongRef, retainCustomObjectFromCb, setAssociatedObject, toObjCObject, toObjCObject, updateStrongRefMethods inherited from class org.robovm.rt.bro.NativeObject
as, getHandle, setHandle
-
Constructor Details
-
UIButton
public UIButton() -
UIButton
-
UIButton
-
UIButton
-
UIButton
-
UIButton
- Since:
- Available in iOS 14.0 and later.
-
UIButton
-
UIButton
- Since:
- Available in iOS 14.0 and later.
-
UIButton
- Since:
- Available in iOS 15.0 and later.
-
-
Method Details
-
getConfiguration
- Since:
- Available in iOS 15.0 and later.
-
setConfiguration
- Since:
- Available in iOS 15.0 and later.
-
getConfigurationUpdateHandler
- Since:
- Available in iOS 15.0 and later.
-
setConfigurationUpdateHandler
- Since:
- Available in iOS 15.0 and later.
-
automaticallyUpdatesConfiguration
public boolean automaticallyUpdatesConfiguration()- Since:
- Available in iOS 15.0 and later.
-
setAutomaticallyUpdatesConfiguration
public void setAutomaticallyUpdatesConfiguration(boolean v)- Since:
- Available in iOS 15.0 and later.
-
getTintColor
- Overrides:
getTintColorin classUIView
-
setTintColor
- Overrides:
setTintColorin classUIView
-
getButtonType
-
isHovered
public boolean isHovered()- Since:
- Available in iOS 15.0 and later.
-
isHeld
public boolean isHeld()- Since:
- Available in iOS 15.0 and later.
-
getRole
- Since:
- Available in iOS 14.0 and later.
-
setRole
- Since:
- Available in iOS 14.0 and later.
-
isPointerInteractionEnabled
public boolean isPointerInteractionEnabled()- Since:
- Available in iOS 13.4 and later.
-
setPointerInteractionEnabled
public void setPointerInteractionEnabled(boolean v)- Since:
- Available in iOS 13.4 and later.
-
getPointerStyleProvider
- Since:
- Available in iOS 13.4 and later.
-
setPointerStyleProvider
public void setPointerStyleProvider(Block3<UIButton,UIPointerEffect,UIPointerShape,UIPointerStyle> v)- Since:
- Available in iOS 13.4 and later.
-
getMenu
- Since:
- Available in iOS 14.0 and later.
-
setMenu
- Since:
- Available in iOS 14.0 and later.
-
isChangesSelectionAsPrimaryAction
public boolean isChangesSelectionAsPrimaryAction()- Since:
- Available in iOS 15.0 and later.
-
setChangesSelectionAsPrimaryAction
public void setChangesSelectionAsPrimaryAction(boolean v)- Since:
- Available in iOS 15.0 and later.
-
getCurrentTitle
-
getCurrentTitleColor
-
getCurrentTitleShadowColor
-
getCurrentImage
-
getCurrentBackgroundImage
-
getCurrentPreferredSymbolConfiguration
- Since:
- Available in iOS 13.0 and later.
-
getCurrentAttributedTitle
-
getTitleLabel
-
getImageView
-
getSubtitleLabel
- Since:
- Available in iOS 15.0 and later.
-
getLayerClass
-
getContentEdgeInsets
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration -
setContentEdgeInsets
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration -
getTitleEdgeInsets
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration -
setTitleEdgeInsets
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration -
getImageEdgeInsets
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration -
setImageEdgeInsets
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration -
reversesTitleShadowWhenHighlighted
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration, you may customize to replicate this behavior via a configurationUpdateHandler -
setReversesTitleShadowWhenHighlighted
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration, you may customize to replicate this behavior via a configurationUpdateHandler -
adjustsImageWhenHighlighted
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration, you may customize to replicate this behavior via a configurationUpdateHandler -
setAdjustsImageWhenHighlighted
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration, you may customize to replicate this behavior via a configurationUpdateHandler -
adjustsImageWhenDisabled
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration, you may customize to replicate this behavior via a configurationUpdateHandler -
setAdjustsImageWhenDisabled
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration, you may customize to replicate this behavior via a configurationUpdateHandler -
showsTouchWhenHighlighted
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration -
setShowsTouchWhenHighlighted
Deprecated.Deprecated in iOS 15.0. This property is ignored when using UIButtonConfiguration -
getBehavioralStyle
- Since:
- Available in iOS 15.0 and later.
-
getPreferredBehavioralStyle
- Since:
- Available in iOS 15.0 and later.
-
setPreferredBehavioralStyle
- Since:
- Available in iOS 15.0 and later.
-
isSpringLoaded
public boolean isSpringLoaded()- Specified by:
isSpringLoadedin interfaceUISpringLoadedInteractionSupporting- Since:
- Available in iOS 11.0 and later.
-
setSpringLoaded
public void setSpringLoaded(boolean v)- Specified by:
setSpringLoadedin interfaceUISpringLoadedInteractionSupporting- Since:
- Available in iOS 11.0 and later.
-
adjustsImageSizeForAccessibilityContentSizeCategory
public boolean adjustsImageSizeForAccessibilityContentSizeCategory()- Specified by:
adjustsImageSizeForAccessibilityContentSizeCategoryin interfaceUIAccessibilityContentSizeCategoryImageAdjusting
-
setAdjustsImageSizeForAccessibilityContentSizeCategory
public void setAdjustsImageSizeForAccessibilityContentSizeCategory(boolean v)- Specified by:
setAdjustsImageSizeForAccessibilityContentSizeCategoryin interfaceUIAccessibilityContentSizeCategoryImageAdjusting
-
init
-
init
-
init
-
setNeedsUpdateConfiguration
public void setNeedsUpdateConfiguration()- Since:
- Available in iOS 15.0 and later.
-
updateConfiguration
public void updateConfiguration()- Since:
- Available in iOS 15.0 and later.
-
setTitle
-
setTitleColor
-
setTitleShadowColor
-
setImage
-
setBackgroundImage
-
setPreferredSymbolConfiguration
public void setPreferredSymbolConfiguration(UIImageSymbolConfiguration configuration, UIControlState state)- Since:
- Available in iOS 13.0 and later.
-
setAttributedTitle
-
getTitle
-
getTitleColor
-
getTitleShadowColor
-
getImage
-
getBackgroundImage
-
preferredSymbolConfigurationForImageInState
public UIImageSymbolConfiguration preferredSymbolConfigurationForImageInState(UIControlState state)- Since:
- Available in iOS 13.0 and later.
-
getAttributedTitle
-
create0
-
getSystemButtonWithImage
- Since:
- Available in iOS 13.0 and later.
-
getSystemButtonWithPrimaryAction
- Since:
- Available in iOS 14.0 and later.
-
create0
- Since:
- Available in iOS 14.0 and later.
-
create
- Since:
- Available in iOS 15.0 and later.
-
getUserInterfaceLayoutDirection
public static UIUserInterfaceLayoutDirection getUserInterfaceLayoutDirection(UISemanticContentAttribute attribute)- Since:
- Available in iOS 9.0 and later.
-
getUserInterfaceLayoutDirection
public static UIUserInterfaceLayoutDirection getUserInterfaceLayoutDirection(UISemanticContentAttribute semanticContentAttribute, UIUserInterfaceLayoutDirection layoutDirection)- Since:
- Available in iOS 10.0 and later.
-
getBackgroundRect
Deprecated.Deprecated in iOS 15.0. Override layoutSubviews, call super, and position views as you desire. -
getContentRect
Deprecated.Deprecated in iOS 15.0. Override layoutSubviews, call super, and position views as you desire. -
getTitleRect
Deprecated.Deprecated in iOS 15.0. Override layoutSubviews, call super, and position views as you desire. -
getImageRect
Deprecated.Deprecated in iOS 15.0. Override layoutSubviews, call super, and position views as you desire.
-