#[repr(C)]pub struct UISearchTextField { /* private fields */ }
UIControl
and UIResponder
and UISearchTextField
and UITextField
and UIView
only.Expand description
UISearchTextField is the subclass of UITextField used in UISearchBar, and can also be used elsewhere (e.g. as the titleView of a UINavigationItem).
In addition to its text, a UISearchField can contain tokens. Tokens are discrete representations of non-textual content. Your app might use tokens to represent filters that are being applied in conjunction with the search field’s text. Tokens are always created by the application, and always occur contiguously before the search field’s text.
Note: Because the system drives selection and keyboard behaviors through the UITextInput protocol, and UISearchTextField supports selecting tokens, UISearchTextField assigns UITextPositions to tokens as well as text. If the current selection includes any tokens, their positions are part of the range returned by UISearchTextField.selectedTextRange
. Use the textualRange
property to obtain the range of the text field that excludes any tokens.
Tokens can be programmatically selected by including their position in a range assigned to the selectedTextRange
property. UISearchTextField does not support placing an insertion point before a token; attempting to do so will select the token instead.
See also Apple’s documentation
Implementations§
Source§impl UISearchTextField
impl UISearchTextField
Sourcepub unsafe fn tokens(&self) -> Retained<NSArray<UISearchToken>>
pub unsafe fn tokens(&self) -> Retained<NSArray<UISearchToken>>
Simple access to the collection of tokens.
Sourcepub unsafe fn setTokens(&self, tokens: &NSArray<UISearchToken>)
pub unsafe fn setTokens(&self, tokens: &NSArray<UISearchToken>)
Setter for tokens
.
pub unsafe fn insertToken_atIndex( &self, token: &UISearchToken, token_index: NSInteger, )
pub unsafe fn removeTokenAtIndex(&self, token_index: NSInteger)
Sourcepub unsafe fn positionOfTokenAtIndex(
&self,
token_index: NSInteger,
) -> Retained<UITextPosition>
Available on crate feature UITextInput
only.
pub unsafe fn positionOfTokenAtIndex( &self, token_index: NSInteger, ) -> Retained<UITextPosition>
UITextInput
only.Returns the position of the provided token. To select a token, assign a UITextRange containing its position to the selectedTextRange property.
Sourcepub unsafe fn tokensInRange(
&self,
text_range: &UITextRange,
) -> Retained<NSArray<UISearchToken>>
Available on crate feature UITextInput
only.
pub unsafe fn tokensInRange( &self, text_range: &UITextRange, ) -> Retained<NSArray<UISearchToken>>
UITextInput
only.Returns the tokens which are contained within the provided range.
You can use this method to determine which tokens are included in the user’s current selection. The range may span more than one token or a mixture of tokens and text.
Sourcepub unsafe fn textualRange(&self) -> Retained<UITextRange>
Available on crate feature UITextInput
only.
pub unsafe fn textualRange(&self) -> Retained<UITextRange>
UITextInput
only.The range that corresponds to the field’s text, exclusive of any tokens.
See: -[ <UITextInput
positionWithinRange:atCharacterOffset:]
Sourcepub unsafe fn replaceTextualPortionOfRange_withToken_atIndex(
&self,
text_range: &UITextRange,
token: &UISearchToken,
token_index: NSUInteger,
)
Available on crate feature UITextInput
only.
pub unsafe fn replaceTextualPortionOfRange_withToken_atIndex( &self, text_range: &UITextRange, token: &UISearchToken, token_index: NSUInteger, )
UITextInput
only.Removes any text contained in the specified range, inserts the provided token at the specified index, and selects the newly-inserted token. Does not replace any tokens within the provided range. If the range intersects the marked text range, the marked text is committed.
This method is essentially a convenience wrapper around the more fundamental text
, tokens
, and selectedTextRange
properties, providing the selection behavior the user will expect.
Note: Because this method does not remove any tokens in the provided range, the caller can pass the field’s selectedTextRange to convert the selected portion of the text into a token without first having to trim the range.
Sourcepub unsafe fn tokenBackgroundColor(&self) -> Option<Retained<UIColor>>
Available on crate feature UIColor
only.
pub unsafe fn tokenBackgroundColor(&self) -> Option<Retained<UIColor>>
UIColor
only.Set this to nil for tokens to use their default color.
Sourcepub unsafe fn setTokenBackgroundColor(
&self,
token_background_color: Option<&UIColor>,
)
Available on crate feature UIColor
only.
pub unsafe fn setTokenBackgroundColor( &self, token_background_color: Option<&UIColor>, )
UIColor
only.Setter for tokenBackgroundColor
.
Sourcepub unsafe fn allowsDeletingTokens(&self) -> bool
pub unsafe fn allowsDeletingTokens(&self) -> bool
Whether the user can remove tokens through standard actions such as Delete and Cut.
The application can always remove tokens programmatically. If this property is true, the application must be prepared not only for tokens to be removed, but also to be re-added through Undo. Defaults to true.
Sourcepub unsafe fn setAllowsDeletingTokens(&self, allows_deleting_tokens: bool)
pub unsafe fn setAllowsDeletingTokens(&self, allows_deleting_tokens: bool)
Setter for allowsDeletingTokens
.
Sourcepub unsafe fn allowsCopyingTokens(&self) -> bool
pub unsafe fn allowsCopyingTokens(&self) -> bool
Whether the user can copy tokens to the pasteboard or drag them out of the text field.
To support copying tokens, this property must be true and the delegate must provide an item provider for the tokens to be copied. UISearchTextField always enables the Copy command if any plain text is selected, even if the selection also includes tokens and this property is false. Defaults to true.
Sourcepub unsafe fn setAllowsCopyingTokens(&self, allows_copying_tokens: bool)
pub unsafe fn setAllowsCopyingTokens(&self, allows_copying_tokens: bool)
Setter for allowsCopyingTokens
.
Sourcepub unsafe fn searchSuggestions(
&self,
) -> Option<Retained<NSArray<ProtocolObject<dyn UISearchSuggestion>>>>
Available on crate feature UISearchSuggestion
only.
pub unsafe fn searchSuggestions( &self, ) -> Option<Retained<NSArray<ProtocolObject<dyn UISearchSuggestion>>>>
UISearchSuggestion
only.An array of suggestions that will be presented as a menu beneath the search field when nonempty. Set to nil or @ [] to dismiss the menu. The menu will also dismiss and the property will be set to nil when a suggestion is selected. The delegate is expected to execute any necessary updating when a suggestion is selected.
Sourcepub unsafe fn setSearchSuggestions(
&self,
search_suggestions: Option<&NSArray<ProtocolObject<dyn UISearchSuggestion>>>,
)
Available on crate feature UISearchSuggestion
only.
pub unsafe fn setSearchSuggestions( &self, search_suggestions: Option<&NSArray<ProtocolObject<dyn UISearchSuggestion>>>, )
UISearchSuggestion
only.Setter for searchSuggestions
.
Source§impl UISearchTextField
Methods declared on superclass UIControl
.
impl UISearchTextField
Methods declared on superclass UIControl
.
pub unsafe fn initWithFrame( this: Allocated<Self>, frame: CGRect, ) -> Retained<Self>
objc2-core-foundation
only.pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder, ) -> Option<Retained<Self>>
Sourcepub unsafe fn initWithFrame_primaryAction(
this: Allocated<Self>,
frame: CGRect,
primary_action: Option<&UIAction>,
) -> Retained<Self>
Available on crate features UIAction
and UIMenuElement
and objc2-core-foundation
only.
pub unsafe fn initWithFrame_primaryAction( this: Allocated<Self>, frame: CGRect, primary_action: Option<&UIAction>, ) -> Retained<Self>
UIAction
and UIMenuElement
and objc2-core-foundation
only.Initializes the control and adds primaryAction for the UIControlEventPrimaryActionTriggered control event. Subclasses of UIControl may alter or add behaviors around the usage of primaryAction, see subclass documentation of this initializer for additional information.
Methods from Deref<Target = UITextField>§
pub unsafe fn text(&self) -> Option<Retained<NSString>>
pub unsafe fn attributedText(&self) -> Option<Retained<NSAttributedString>>
Sourcepub unsafe fn setAttributedText(
&self,
attributed_text: Option<&NSAttributedString>,
)
pub unsafe fn setAttributedText( &self, attributed_text: Option<&NSAttributedString>, )
Setter for attributedText
.
pub unsafe fn textColor(&self) -> Option<Retained<UIColor>>
UIColor
only.Sourcepub unsafe fn setTextColor(&self, text_color: Option<&UIColor>)
Available on crate feature UIColor
only.
pub unsafe fn setTextColor(&self, text_color: Option<&UIColor>)
UIColor
only.Setter for textColor
.
pub unsafe fn font(&self) -> Option<Retained<UIFont>>
UIFont
only.Sourcepub unsafe fn setFont(&self, font: Option<&UIFont>)
Available on crate feature UIFont
only.
pub unsafe fn setFont(&self, font: Option<&UIFont>)
UIFont
only.Setter for font
.
pub unsafe fn textAlignment(&self) -> NSTextAlignment
NSText
only.Sourcepub unsafe fn setTextAlignment(&self, text_alignment: NSTextAlignment)
Available on crate feature NSText
only.
pub unsafe fn setTextAlignment(&self, text_alignment: NSTextAlignment)
NSText
only.Setter for textAlignment
.
pub unsafe fn borderStyle(&self) -> UITextBorderStyle
Sourcepub unsafe fn setBorderStyle(&self, border_style: UITextBorderStyle)
pub unsafe fn setBorderStyle(&self, border_style: UITextBorderStyle)
Setter for borderStyle
.
pub unsafe fn defaultTextAttributes( &self, ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>
Sourcepub unsafe fn setDefaultTextAttributes(
&self,
default_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
)
pub unsafe fn setDefaultTextAttributes( &self, default_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>, )
Setter for defaultTextAttributes
.
pub unsafe fn placeholder(&self) -> Option<Retained<NSString>>
Sourcepub unsafe fn setPlaceholder(&self, placeholder: Option<&NSString>)
pub unsafe fn setPlaceholder(&self, placeholder: Option<&NSString>)
Setter for placeholder
.
pub unsafe fn attributedPlaceholder( &self, ) -> Option<Retained<NSAttributedString>>
Sourcepub unsafe fn setAttributedPlaceholder(
&self,
attributed_placeholder: Option<&NSAttributedString>,
)
pub unsafe fn setAttributedPlaceholder( &self, attributed_placeholder: Option<&NSAttributedString>, )
Setter for attributedPlaceholder
.
pub unsafe fn clearsOnBeginEditing(&self) -> bool
Sourcepub unsafe fn setClearsOnBeginEditing(&self, clears_on_begin_editing: bool)
pub unsafe fn setClearsOnBeginEditing(&self, clears_on_begin_editing: bool)
Setter for clearsOnBeginEditing
.
pub unsafe fn adjustsFontSizeToFitWidth(&self) -> bool
Sourcepub unsafe fn setAdjustsFontSizeToFitWidth(
&self,
adjusts_font_size_to_fit_width: bool,
)
pub unsafe fn setAdjustsFontSizeToFitWidth( &self, adjusts_font_size_to_fit_width: bool, )
Setter for adjustsFontSizeToFitWidth
.
pub unsafe fn minimumFontSize(&self) -> CGFloat
objc2-core-foundation
only.Sourcepub unsafe fn setMinimumFontSize(&self, minimum_font_size: CGFloat)
Available on crate feature objc2-core-foundation
only.
pub unsafe fn setMinimumFontSize(&self, minimum_font_size: CGFloat)
objc2-core-foundation
only.Setter for minimumFontSize
.
pub unsafe fn delegate( &self, ) -> Option<Retained<ProtocolObject<dyn UITextFieldDelegate>>>
Sourcepub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn UITextFieldDelegate>>,
)
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn UITextFieldDelegate>>, )
This is a weak property.
Setter for delegate
.
pub unsafe fn background(&self) -> Option<Retained<UIImage>>
UIImage
only.Sourcepub unsafe fn setBackground(&self, background: Option<&UIImage>)
Available on crate feature UIImage
only.
pub unsafe fn setBackground(&self, background: Option<&UIImage>)
UIImage
only.Setter for background
.
pub unsafe fn disabledBackground(&self) -> Option<Retained<UIImage>>
UIImage
only.Sourcepub unsafe fn setDisabledBackground(
&self,
disabled_background: Option<&UIImage>,
)
Available on crate feature UIImage
only.
pub unsafe fn setDisabledBackground( &self, disabled_background: Option<&UIImage>, )
UIImage
only.Setter for disabledBackground
.
pub unsafe fn isEditing(&self) -> bool
pub unsafe fn allowsEditingTextAttributes(&self) -> bool
Sourcepub unsafe fn setAllowsEditingTextAttributes(
&self,
allows_editing_text_attributes: bool,
)
pub unsafe fn setAllowsEditingTextAttributes( &self, allows_editing_text_attributes: bool, )
Setter for allowsEditingTextAttributes
.
pub unsafe fn typingAttributes( &self, ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
Sourcepub unsafe fn setTypingAttributes(
&self,
typing_attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
)
pub unsafe fn setTypingAttributes( &self, typing_attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>, )
Setter for typingAttributes
.
pub unsafe fn clearButtonMode(&self) -> UITextFieldViewMode
Sourcepub unsafe fn setClearButtonMode(&self, clear_button_mode: UITextFieldViewMode)
pub unsafe fn setClearButtonMode(&self, clear_button_mode: UITextFieldViewMode)
Setter for clearButtonMode
.
pub unsafe fn leftView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn setLeftView(&self, left_view: Option<&UIView>)
pub unsafe fn setLeftView(&self, left_view: Option<&UIView>)
Setter for leftView
.
pub unsafe fn leftViewMode(&self) -> UITextFieldViewMode
Sourcepub unsafe fn setLeftViewMode(&self, left_view_mode: UITextFieldViewMode)
pub unsafe fn setLeftViewMode(&self, left_view_mode: UITextFieldViewMode)
Setter for leftViewMode
.
pub unsafe fn rightView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn setRightView(&self, right_view: Option<&UIView>)
pub unsafe fn setRightView(&self, right_view: Option<&UIView>)
Setter for rightView
.
pub unsafe fn rightViewMode(&self) -> UITextFieldViewMode
Sourcepub unsafe fn setRightViewMode(&self, right_view_mode: UITextFieldViewMode)
pub unsafe fn setRightViewMode(&self, right_view_mode: UITextFieldViewMode)
Setter for rightViewMode
.
pub unsafe fn borderRectForBounds(&self, bounds: CGRect) -> CGRect
objc2-core-foundation
only.pub unsafe fn textRectForBounds(&self, bounds: CGRect) -> CGRect
objc2-core-foundation
only.pub unsafe fn placeholderRectForBounds(&self, bounds: CGRect) -> CGRect
objc2-core-foundation
only.pub unsafe fn editingRectForBounds(&self, bounds: CGRect) -> CGRect
objc2-core-foundation
only.pub unsafe fn clearButtonRectForBounds(&self, bounds: CGRect) -> CGRect
objc2-core-foundation
only.pub unsafe fn leftViewRectForBounds(&self, bounds: CGRect) -> CGRect
objc2-core-foundation
only.pub unsafe fn rightViewRectForBounds(&self, bounds: CGRect) -> CGRect
objc2-core-foundation
only.pub unsafe fn drawTextInRect(&self, rect: CGRect)
objc2-core-foundation
only.pub unsafe fn drawPlaceholderInRect(&self, rect: CGRect)
objc2-core-foundation
only.pub unsafe fn inputView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn setInputView(&self, input_view: Option<&UIView>)
pub unsafe fn setInputView(&self, input_view: Option<&UIView>)
Setter for inputView
.
pub unsafe fn inputAccessoryView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn setInputAccessoryView(
&self,
input_accessory_view: Option<&UIView>,
)
pub unsafe fn setInputAccessoryView( &self, input_accessory_view: Option<&UIView>, )
Setter for inputAccessoryView
.
pub unsafe fn clearsOnInsertion(&self) -> bool
Sourcepub unsafe fn setClearsOnInsertion(&self, clears_on_insertion: bool)
pub unsafe fn setClearsOnInsertion(&self, clears_on_insertion: bool)
Setter for clearsOnInsertion
.
pub unsafe fn interactionState(&self) -> Retained<AnyObject>
Sourcepub unsafe fn setInteractionState(&self, interaction_state: &AnyObject)
pub unsafe fn setInteractionState(&self, interaction_state: &AnyObject)
Setter for interactionState
.
Methods from Deref<Target = UIControl>§
pub unsafe fn isEnabled(&self) -> bool
Sourcepub unsafe fn setEnabled(&self, enabled: bool)
pub unsafe fn setEnabled(&self, enabled: bool)
Setter for isEnabled
.
pub unsafe fn isSelected(&self) -> bool
Sourcepub unsafe fn setSelected(&self, selected: bool)
pub unsafe fn setSelected(&self, selected: bool)
Setter for isSelected
.
pub unsafe fn isHighlighted(&self) -> bool
Sourcepub unsafe fn setHighlighted(&self, highlighted: bool)
pub unsafe fn setHighlighted(&self, highlighted: bool)
Setter for isHighlighted
.
pub unsafe fn contentVerticalAlignment( &self, ) -> UIControlContentVerticalAlignment
Sourcepub unsafe fn setContentVerticalAlignment(
&self,
content_vertical_alignment: UIControlContentVerticalAlignment,
)
pub unsafe fn setContentVerticalAlignment( &self, content_vertical_alignment: UIControlContentVerticalAlignment, )
Setter for contentVerticalAlignment
.
pub unsafe fn contentHorizontalAlignment( &self, ) -> UIControlContentHorizontalAlignment
Sourcepub unsafe fn setContentHorizontalAlignment(
&self,
content_horizontal_alignment: UIControlContentHorizontalAlignment,
)
pub unsafe fn setContentHorizontalAlignment( &self, content_horizontal_alignment: UIControlContentHorizontalAlignment, )
Setter for contentHorizontalAlignment
.
pub unsafe fn effectiveContentHorizontalAlignment( &self, ) -> UIControlContentHorizontalAlignment
pub unsafe fn state(&self) -> UIControlState
pub unsafe fn isTracking(&self) -> bool
pub unsafe fn isTouchInside(&self) -> bool
pub unsafe fn beginTrackingWithTouch_withEvent( &self, touch: &UITouch, event: Option<&UIEvent>, ) -> bool
UIEvent
and UITouch
only.pub unsafe fn continueTrackingWithTouch_withEvent( &self, touch: &UITouch, event: Option<&UIEvent>, ) -> bool
UIEvent
and UITouch
only.pub unsafe fn endTrackingWithTouch_withEvent( &self, touch: Option<&UITouch>, event: Option<&UIEvent>, )
UIEvent
and UITouch
only.pub unsafe fn cancelTrackingWithEvent(&self, event: Option<&UIEvent>)
UIEvent
only.pub unsafe fn addTarget_action_forControlEvents( &self, target: Option<&AnyObject>, action: Sel, control_events: UIControlEvents, )
pub unsafe fn removeTarget_action_forControlEvents( &self, target: Option<&AnyObject>, action: Option<Sel>, control_events: UIControlEvents, )
Sourcepub unsafe fn addAction_forControlEvents(
&self,
action: &UIAction,
control_events: UIControlEvents,
)
Available on crate features UIAction
and UIMenuElement
only.
pub unsafe fn addAction_forControlEvents( &self, action: &UIAction, control_events: UIControlEvents, )
UIAction
and UIMenuElement
only.Adds the UIAction to a given event. UIActions are uniqued based on their identifier, and subsequent actions with the same identifier replace previously added actions. You may add multiple UIActions for corresponding controlEvents, and you may add the same action to multiple controlEvents.
Sourcepub unsafe fn removeAction_forControlEvents(
&self,
action: &UIAction,
control_events: UIControlEvents,
)
Available on crate features UIAction
and UIMenuElement
only.
pub unsafe fn removeAction_forControlEvents( &self, action: &UIAction, control_events: UIControlEvents, )
UIAction
and UIMenuElement
only.Removes the action from the set of passed control events.
Sourcepub unsafe fn removeActionForIdentifier_forControlEvents(
&self,
action_identifier: &UIActionIdentifier,
control_events: UIControlEvents,
)
Available on crate feature UIAction
only.
pub unsafe fn removeActionForIdentifier_forControlEvents( &self, action_identifier: &UIActionIdentifier, control_events: UIControlEvents, )
UIAction
only.Removes the action with the provided identifier from the set of passed control events.
Sourcepub unsafe fn performPrimaryAction(&self)
pub unsafe fn performPrimaryAction(&self)
Performs the control’s primary action.
pub unsafe fn allTargets(&self) -> Retained<NSSet>
pub unsafe fn allControlEvents(&self) -> UIControlEvents
pub unsafe fn actionsForTarget_forControlEvent( &self, target: Option<&AnyObject>, control_event: UIControlEvents, ) -> Option<Retained<NSArray<NSString>>>
Sourcepub unsafe fn enumerateEventHandlers(
&self,
iterator: &DynBlock<dyn Fn(*mut UIAction, *mut AnyObject, Option<Sel>, UIControlEvents, NonNull<Bool>) + '_>,
)
Available on crate features UIAction
and UIMenuElement
and block2
only.
pub unsafe fn enumerateEventHandlers( &self, iterator: &DynBlock<dyn Fn(*mut UIAction, *mut AnyObject, Option<Sel>, UIControlEvents, NonNull<Bool>) + '_>, )
UIAction
and UIMenuElement
and block2
only.Iterate over the event handlers installed on this control at the time this method is called. For each call, either actionHandler or action will be non-nil. controlEvents is always non-zero. Setting *stop to YES will terminate the enumeration early. It is legal to manipulate the control’s event handlers within the block.
Sourcepub unsafe fn sendAction_to_forEvent(
&self,
action: Sel,
target: Option<&AnyObject>,
event: Option<&UIEvent>,
)
Available on crate feature UIEvent
only.
pub unsafe fn sendAction_to_forEvent( &self, action: Sel, target: Option<&AnyObject>, event: Option<&UIEvent>, )
UIEvent
only.Dispatch the target-action pair. This method is called repeatedly by -sendActionsForControlEvents: and is a point at which you can observe or override behavior.
Sourcepub unsafe fn sendAction(&self, action: &UIAction)
Available on crate features UIAction
and UIMenuElement
only.
pub unsafe fn sendAction(&self, action: &UIAction)
UIAction
and UIMenuElement
only.Like -sendAction:to:forEvent:, this method is called by -sendActionsForControlEvents:. You may override this method to observe or modify behavior. If you override this method, you should call super precisely once to dispatch the action, or not call super to suppress sending that action.
Sourcepub unsafe fn sendActionsForControlEvents(
&self,
control_events: UIControlEvents,
)
pub unsafe fn sendActionsForControlEvents( &self, control_events: UIControlEvents, )
send all actions associated with the given control events
Sourcepub unsafe fn contextMenuInteraction(
&self,
) -> Option<Retained<UIContextMenuInteraction>>
Available on crate feature UIContextMenuInteraction
only.
pub unsafe fn contextMenuInteraction( &self, ) -> Option<Retained<UIContextMenuInteraction>>
UIContextMenuInteraction
only.Returns a UIContextMenuInteraction with this control set as its delegate. Before constructing the UIContextMenuInteraction, UIControl verifies ‘self’ is a viable delegate. See ‘Implementing UIControl Menus’ below for more details.
Sourcepub unsafe fn isContextMenuInteractionEnabled(&self) -> bool
pub unsafe fn isContextMenuInteractionEnabled(&self) -> bool
Specifies if the context menu interaction is enabled. NO by default.
Sourcepub unsafe fn setContextMenuInteractionEnabled(
&self,
context_menu_interaction_enabled: bool,
)
pub unsafe fn setContextMenuInteractionEnabled( &self, context_menu_interaction_enabled: bool, )
Setter for isContextMenuInteractionEnabled
.
Sourcepub unsafe fn showsMenuAsPrimaryAction(&self) -> bool
pub unsafe fn showsMenuAsPrimaryAction(&self) -> bool
If the contextMenuInteraction is the primary action of the control, invoked on touch-down. NO by default.
Sourcepub unsafe fn setShowsMenuAsPrimaryAction(
&self,
shows_menu_as_primary_action: bool,
)
pub unsafe fn setShowsMenuAsPrimaryAction( &self, shows_menu_as_primary_action: bool, )
Setter for showsMenuAsPrimaryAction
.
Available on crate features UIContextMenuConfiguration
and objc2-core-foundation
only.
UIContextMenuConfiguration
and objc2-core-foundation
only.Return a point in this control’s coordinate space to which to attach the given configuration’s menu.
Sourcepub unsafe fn toolTip(&self) -> Option<Retained<NSString>>
pub unsafe fn toolTip(&self) -> Option<Retained<NSString>>
Assigning a value to this property causes the tool tip to be displayed for the view. Setting the property to nil cancels the display of the tool tip for the view.
Sourcepub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>)
pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>)
Setter for toolTip
.
Sourcepub unsafe fn toolTipInteraction(
&self,
) -> Option<Retained<UIToolTipInteraction>>
Available on crate feature UIToolTipInteraction
only.
pub unsafe fn toolTipInteraction( &self, ) -> Option<Retained<UIToolTipInteraction>>
UIToolTipInteraction
only.Returns the control’s default UIToolTipInteraction.
Sourcepub unsafe fn isSymbolAnimationEnabled(&self) -> bool
pub unsafe fn isSymbolAnimationEnabled(&self) -> bool
Whether or not symbol animations are enabled for this control. The default value varies depending on the control.
Sourcepub unsafe fn setSymbolAnimationEnabled(&self, symbol_animation_enabled: bool)
pub unsafe fn setSymbolAnimationEnabled(&self, symbol_animation_enabled: bool)
Setter for isSymbolAnimationEnabled
.
Sourcepub unsafe fn contextMenuInteraction_configurationForMenuAtLocation(
&self,
interaction: &UIContextMenuInteraction,
location: CGPoint,
) -> Option<Retained<UIContextMenuConfiguration>>
Available on crate features UIContextMenuConfiguration
and UIContextMenuInteraction
and objc2-core-foundation
only.
pub unsafe fn contextMenuInteraction_configurationForMenuAtLocation( &self, interaction: &UIContextMenuInteraction, location: CGPoint, ) -> Option<Retained<UIContextMenuConfiguration>>
UIContextMenuConfiguration
and UIContextMenuInteraction
and objc2-core-foundation
only.An override is required for UIControl to create a UIContextMenuInteraction. Direct UIControl subclasses do not need to call super.
Sourcepub unsafe fn contextMenuInteraction_previewForHighlightingMenuWithConfiguration(
&self,
interaction: &UIContextMenuInteraction,
configuration: &UIContextMenuConfiguration,
) -> Option<Retained<UITargetedPreview>>
Available on crate features UIContextMenuConfiguration
and UIContextMenuInteraction
and UITargetedPreview
only.
pub unsafe fn contextMenuInteraction_previewForHighlightingMenuWithConfiguration( &self, interaction: &UIContextMenuInteraction, configuration: &UIContextMenuConfiguration, ) -> Option<Retained<UITargetedPreview>>
UIContextMenuConfiguration
and UIContextMenuInteraction
and UITargetedPreview
only.Direct UIControl subclasses do not need to call super.
Sourcepub unsafe fn contextMenuInteraction_previewForDismissingMenuWithConfiguration(
&self,
interaction: &UIContextMenuInteraction,
configuration: &UIContextMenuConfiguration,
) -> Option<Retained<UITargetedPreview>>
Available on crate features UIContextMenuConfiguration
and UIContextMenuInteraction
and UITargetedPreview
only.
pub unsafe fn contextMenuInteraction_previewForDismissingMenuWithConfiguration( &self, interaction: &UIContextMenuInteraction, configuration: &UIContextMenuConfiguration, ) -> Option<Retained<UITargetedPreview>>
UIContextMenuConfiguration
and UIContextMenuInteraction
and UITargetedPreview
only.Direct UIControl subclasses do not need to call super.
Sourcepub unsafe fn contextMenuInteraction_willDisplayMenuForConfiguration_animator(
&self,
interaction: &UIContextMenuInteraction,
configuration: &UIContextMenuConfiguration,
animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
)
Available on crate features UIContextMenuConfiguration
and UIContextMenuInteraction
only.
pub unsafe fn contextMenuInteraction_willDisplayMenuForConfiguration_animator( &self, interaction: &UIContextMenuInteraction, configuration: &UIContextMenuConfiguration, animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>, )
UIContextMenuConfiguration
and UIContextMenuInteraction
only.UIControl subclasses should always call super.
Sourcepub unsafe fn contextMenuInteraction_willEndForConfiguration_animator(
&self,
interaction: &UIContextMenuInteraction,
configuration: &UIContextMenuConfiguration,
animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
)
Available on crate features UIContextMenuConfiguration
and UIContextMenuInteraction
only.
pub unsafe fn contextMenuInteraction_willEndForConfiguration_animator( &self, interaction: &UIContextMenuInteraction, configuration: &UIContextMenuConfiguration, animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>, )
UIContextMenuConfiguration
and UIContextMenuInteraction
only.UIControl subclasses should always call super.
Sourcepub unsafe fn contextMenuInteraction_willPerformPreviewActionForMenuWithConfiguration_animator(
&self,
interaction: &UIContextMenuInteraction,
configuration: &UIContextMenuConfiguration,
animator: &ProtocolObject<dyn UIContextMenuInteractionCommitAnimating>,
)
Available on crate features UIContextMenuConfiguration
and UIContextMenuInteraction
only.
pub unsafe fn contextMenuInteraction_willPerformPreviewActionForMenuWithConfiguration_animator( &self, interaction: &UIContextMenuInteraction, configuration: &UIContextMenuConfiguration, animator: &ProtocolObject<dyn UIContextMenuInteractionCommitAnimating>, )
UIContextMenuConfiguration
and UIContextMenuInteraction
only.UIControl based menus do not display previews, so this method will not be called even if implemented. UIControl does not have an implementation.
Methods from Deref<Target = UIView>§
pub unsafe fn accessibilityIgnoresInvertColors(&self) -> bool
UIAccessibilityAdditions
only.Sourcepub unsafe fn setAccessibilityIgnoresInvertColors(
&self,
accessibility_ignores_invert_colors: bool,
)
Available on crate feature UIAccessibilityAdditions
only.
pub unsafe fn setAccessibilityIgnoresInvertColors( &self, accessibility_ignores_invert_colors: bool, )
UIAccessibilityAdditions
only.Setter for accessibilityIgnoresInvertColors
.
Sourcepub unsafe fn hoverStyle(&self) -> Option<Retained<UIHoverStyle>>
Available on crate feature UIHoverStyle
only.
pub unsafe fn hoverStyle(&self) -> Option<Retained<UIHoverStyle>>
UIHoverStyle
only.The hover style associated with this view. Defaults to nil
,
indicating that this view should not have any hover effect.
Subclasses may configure this style to use a different default value.
Sourcepub unsafe fn setHoverStyle(&self, hover_style: Option<&UIHoverStyle>)
Available on crate feature UIHoverStyle
only.
pub unsafe fn setHoverStyle(&self, hover_style: Option<&UIHoverStyle>)
UIHoverStyle
only.Setter for hoverStyle
.
pub unsafe fn addInteraction( &self, interaction: &ProtocolObject<dyn UIInteraction>, )
UIInteraction
only.pub unsafe fn removeInteraction( &self, interaction: &ProtocolObject<dyn UIInteraction>, )
UIInteraction
only.pub unsafe fn interactions( &self, ) -> Retained<NSArray<ProtocolObject<dyn UIInteraction>>>
UIInteraction
only.Sourcepub unsafe fn setInteractions(
&self,
interactions: &NSArray<ProtocolObject<dyn UIInteraction>>,
)
Available on crate feature UIInteraction
only.
pub unsafe fn setInteractions( &self, interactions: &NSArray<ProtocolObject<dyn UIInteraction>>, )
UIInteraction
only.Setter for interactions
.
pub unsafe fn showsLargeContentViewer(&self) -> bool
UILargeContentViewer
only.Sourcepub unsafe fn setShowsLargeContentViewer(
&self,
shows_large_content_viewer: bool,
)
Available on crate feature UILargeContentViewer
only.
pub unsafe fn setShowsLargeContentViewer( &self, shows_large_content_viewer: bool, )
UILargeContentViewer
only.Setter for showsLargeContentViewer
.
pub unsafe fn largeContentTitle(&self) -> Option<Retained<NSString>>
UILargeContentViewer
only.Sourcepub unsafe fn setLargeContentTitle(
&self,
large_content_title: Option<&NSString>,
)
Available on crate feature UILargeContentViewer
only.
pub unsafe fn setLargeContentTitle( &self, large_content_title: Option<&NSString>, )
UILargeContentViewer
only.Setter for largeContentTitle
.
pub unsafe fn largeContentImage(&self) -> Option<Retained<UIImage>>
UILargeContentViewer
and UIImage
only.Sourcepub unsafe fn setLargeContentImage(&self, large_content_image: Option<&UIImage>)
Available on crate features UILargeContentViewer
and UIImage
only.
pub unsafe fn setLargeContentImage(&self, large_content_image: Option<&UIImage>)
UILargeContentViewer
and UIImage
only.Setter for largeContentImage
.
pub unsafe fn scalesLargeContentImage(&self) -> bool
UILargeContentViewer
only.Sourcepub unsafe fn setScalesLargeContentImage(
&self,
scales_large_content_image: bool,
)
Available on crate feature UILargeContentViewer
only.
pub unsafe fn setScalesLargeContentImage( &self, scales_large_content_image: bool, )
UILargeContentViewer
only.Setter for scalesLargeContentImage
.
pub unsafe fn largeContentImageInsets(&self) -> UIEdgeInsets
UILargeContentViewer
and UIGeometry
and objc2-core-foundation
only.Sourcepub unsafe fn setLargeContentImageInsets(
&self,
large_content_image_insets: UIEdgeInsets,
)
Available on crate features UILargeContentViewer
and UIGeometry
and objc2-core-foundation
only.
pub unsafe fn setLargeContentImageInsets( &self, large_content_image_insets: UIEdgeInsets, )
UILargeContentViewer
and UIGeometry
and objc2-core-foundation
only.Setter for largeContentImageInsets
.
pub unsafe fn viewPrintFormatter(&self) -> Retained<UIViewPrintFormatter>
UIPrintFormatter
only.pub unsafe fn drawRect_forViewPrintFormatter( &self, rect: CGRect, formatter: &UIViewPrintFormatter, )
UIPrintFormatter
and objc2-core-foundation
only.pub unsafe fn endEditing(&self, force: bool) -> bool
pub unsafe fn isUserInteractionEnabled(&self) -> bool
Sourcepub unsafe fn setUserInteractionEnabled(&self, user_interaction_enabled: bool)
pub unsafe fn setUserInteractionEnabled(&self, user_interaction_enabled: bool)
Setter for isUserInteractionEnabled
.
pub unsafe fn tag(&self) -> NSInteger
pub fn layer(&self) -> Retained<CALayer>
objc2-quartz-core
and non-watchOS only.pub unsafe fn canBecomeFocused(&self) -> bool
pub unsafe fn isFocused(&self) -> bool
Sourcepub unsafe fn focusGroupIdentifier(&self) -> Option<Retained<NSString>>
pub unsafe fn focusGroupIdentifier(&self) -> Option<Retained<NSString>>
The identifier of the focus group that this view belongs to. If this is nil, subviews inherit their superview’s focus group.
Sourcepub unsafe fn setFocusGroupIdentifier(
&self,
focus_group_identifier: Option<&NSString>,
)
pub unsafe fn setFocusGroupIdentifier( &self, focus_group_identifier: Option<&NSString>, )
Setter for focusGroupIdentifier
.
Sourcepub unsafe fn focusGroupPriority(&self) -> UIFocusGroupPriority
Available on crate feature UIFocus
only.
pub unsafe fn focusGroupPriority(&self) -> UIFocusGroupPriority
UIFocus
only.The priority this item has in its focus group. The higher the priority, the more likely it is to get picked when focus moves into this group. Note: this method can only be used to increase an item’s priority, not decrease it. For example if an item is currently selected, the actual priority of this item will be determined by MAX(focusGroupPriority, UIFocusGroupPrioritySelected).
Sourcepub unsafe fn setFocusGroupPriority(
&self,
focus_group_priority: UIFocusGroupPriority,
)
Available on crate feature UIFocus
only.
pub unsafe fn setFocusGroupPriority( &self, focus_group_priority: UIFocusGroupPriority, )
UIFocus
only.Setter for focusGroupPriority
.
Sourcepub unsafe fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
Available on crate feature UIFocusEffect
only.
pub unsafe fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
UIFocusEffect
only.Describes a visual effect to apply when this item is focused. If this property is nil no effect will be applied when this view becomes focused.
Sourcepub unsafe fn setFocusEffect(&self, focus_effect: Option<&UIFocusEffect>)
Available on crate feature UIFocusEffect
only.
pub unsafe fn setFocusEffect(&self, focus_effect: Option<&UIFocusEffect>)
UIFocusEffect
only.Setter for focusEffect
.
pub unsafe fn semanticContentAttribute(&self) -> UISemanticContentAttribute
Sourcepub unsafe fn setSemanticContentAttribute(
&self,
semantic_content_attribute: UISemanticContentAttribute,
)
pub unsafe fn setSemanticContentAttribute( &self, semantic_content_attribute: UISemanticContentAttribute, )
Setter for semanticContentAttribute
.
pub unsafe fn effectiveUserInterfaceLayoutDirection( &self, ) -> UIUserInterfaceLayoutDirection
UIInterface
only.pub fn frame(&self) -> CGRect
objc2-core-foundation
only.Sourcepub fn setFrame(&self, frame: CGRect)
Available on crate feature objc2-core-foundation
only.
pub fn setFrame(&self, frame: CGRect)
objc2-core-foundation
only.Setter for frame
.
pub fn bounds(&self) -> CGRect
objc2-core-foundation
only.Sourcepub fn setBounds(&self, bounds: CGRect)
Available on crate feature objc2-core-foundation
only.
pub fn setBounds(&self, bounds: CGRect)
objc2-core-foundation
only.Setter for bounds
.
pub unsafe fn center(&self) -> CGPoint
objc2-core-foundation
only.Sourcepub unsafe fn setCenter(&self, center: CGPoint)
Available on crate feature objc2-core-foundation
only.
pub unsafe fn setCenter(&self, center: CGPoint)
objc2-core-foundation
only.Setter for center
.
pub unsafe fn transform(&self) -> CGAffineTransform
objc2-core-foundation
only.Sourcepub unsafe fn setTransform(&self, transform: CGAffineTransform)
Available on crate feature objc2-core-foundation
only.
pub unsafe fn setTransform(&self, transform: CGAffineTransform)
objc2-core-foundation
only.Setter for transform
.
pub unsafe fn transform3D(&self) -> CATransform3D
objc2-quartz-core
and non-watchOS only.Sourcepub unsafe fn setTransform3D(&self, transform3_d: CATransform3D)
Available on crate feature objc2-quartz-core
and non-watchOS only.
pub unsafe fn setTransform3D(&self, transform3_d: CATransform3D)
objc2-quartz-core
and non-watchOS only.Setter for transform3D
.
pub fn contentScaleFactor(&self) -> CGFloat
objc2-core-foundation
only.Sourcepub fn setContentScaleFactor(&self, content_scale_factor: CGFloat)
Available on crate feature objc2-core-foundation
only.
pub fn setContentScaleFactor(&self, content_scale_factor: CGFloat)
objc2-core-foundation
only.Setter for contentScaleFactor
.
pub unsafe fn anchorPoint(&self) -> CGPoint
objc2-core-foundation
only.Sourcepub unsafe fn setAnchorPoint(&self, anchor_point: CGPoint)
Available on crate feature objc2-core-foundation
only.
pub unsafe fn setAnchorPoint(&self, anchor_point: CGPoint)
objc2-core-foundation
only.Setter for anchorPoint
.
pub unsafe fn isMultipleTouchEnabled(&self) -> bool
Sourcepub fn setMultipleTouchEnabled(&self, multiple_touch_enabled: bool)
pub fn setMultipleTouchEnabled(&self, multiple_touch_enabled: bool)
Setter for isMultipleTouchEnabled
.
pub unsafe fn isExclusiveTouch(&self) -> bool
Sourcepub unsafe fn setExclusiveTouch(&self, exclusive_touch: bool)
pub unsafe fn setExclusiveTouch(&self, exclusive_touch: bool)
Setter for isExclusiveTouch
.
pub unsafe fn hitTest_withEvent( &self, point: CGPoint, event: Option<&UIEvent>, ) -> Option<Retained<UIView>>
UIEvent
and objc2-core-foundation
only.pub unsafe fn pointInside_withEvent( &self, point: CGPoint, event: Option<&UIEvent>, ) -> bool
UIEvent
and objc2-core-foundation
only.pub unsafe fn convertPoint_toView( &self, point: CGPoint, view: Option<&UIView>, ) -> CGPoint
objc2-core-foundation
only.pub unsafe fn convertPoint_fromView( &self, point: CGPoint, view: Option<&UIView>, ) -> CGPoint
objc2-core-foundation
only.pub unsafe fn convertRect_toView( &self, rect: CGRect, view: Option<&UIView>, ) -> CGRect
objc2-core-foundation
only.pub unsafe fn convertRect_fromView( &self, rect: CGRect, view: Option<&UIView>, ) -> CGRect
objc2-core-foundation
only.pub unsafe fn autoresizesSubviews(&self) -> bool
Sourcepub unsafe fn setAutoresizesSubviews(&self, autoresizes_subviews: bool)
pub unsafe fn setAutoresizesSubviews(&self, autoresizes_subviews: bool)
Setter for autoresizesSubviews
.
pub unsafe fn autoresizingMask(&self) -> UIViewAutoresizing
Sourcepub unsafe fn setAutoresizingMask(&self, autoresizing_mask: UIViewAutoresizing)
pub unsafe fn setAutoresizingMask(&self, autoresizing_mask: UIViewAutoresizing)
Setter for autoresizingMask
.
pub unsafe fn sizeThatFits(&self, size: CGSize) -> CGSize
objc2-core-foundation
only.pub unsafe fn sizeToFit(&self)
pub fn superview(&self) -> Option<Retained<UIView>>
pub fn subviews(&self) -> Retained<NSArray<UIView>>
pub fn window(&self) -> Option<Retained<UIWindow>>
UIWindow
only.pub unsafe fn removeFromSuperview(&self)
pub unsafe fn insertSubview_atIndex(&self, view: &UIView, index: NSInteger)
pub unsafe fn exchangeSubviewAtIndex_withSubviewAtIndex( &self, index1: NSInteger, index2: NSInteger, )
pub unsafe fn addSubview(&self, view: &UIView)
pub unsafe fn insertSubview_belowSubview( &self, view: &UIView, sibling_subview: &UIView, )
pub unsafe fn insertSubview_aboveSubview( &self, view: &UIView, sibling_subview: &UIView, )
pub unsafe fn bringSubviewToFront(&self, view: &UIView)
pub unsafe fn sendSubviewToBack(&self, view: &UIView)
pub unsafe fn didAddSubview(&self, subview: &UIView)
pub unsafe fn willRemoveSubview(&self, subview: &UIView)
pub unsafe fn willMoveToSuperview(&self, new_superview: Option<&UIView>)
pub unsafe fn didMoveToSuperview(&self)
pub unsafe fn willMoveToWindow(&self, new_window: Option<&UIWindow>)
UIWindow
only.pub unsafe fn didMoveToWindow(&self)
pub unsafe fn isDescendantOfView(&self, view: &UIView) -> bool
pub unsafe fn viewWithTag(&self, tag: NSInteger) -> Option<Retained<UIView>>
pub unsafe fn setNeedsLayout(&self)
pub unsafe fn layoutIfNeeded(&self)
pub unsafe fn layoutSubviews(&self)
pub unsafe fn layoutMargins(&self) -> UIEdgeInsets
UIGeometry
and objc2-core-foundation
only.Sourcepub unsafe fn setLayoutMargins(&self, layout_margins: UIEdgeInsets)
Available on crate features UIGeometry
and objc2-core-foundation
only.
pub unsafe fn setLayoutMargins(&self, layout_margins: UIEdgeInsets)
UIGeometry
and objc2-core-foundation
only.Setter for layoutMargins
.
pub unsafe fn directionalLayoutMargins(&self) -> NSDirectionalEdgeInsets
UIGeometry
and objc2-core-foundation
only.Sourcepub unsafe fn setDirectionalLayoutMargins(
&self,
directional_layout_margins: NSDirectionalEdgeInsets,
)
Available on crate features UIGeometry
and objc2-core-foundation
only.
pub unsafe fn setDirectionalLayoutMargins( &self, directional_layout_margins: NSDirectionalEdgeInsets, )
UIGeometry
and objc2-core-foundation
only.Setter for directionalLayoutMargins
.
pub unsafe fn preservesSuperviewLayoutMargins(&self) -> bool
Sourcepub unsafe fn setPreservesSuperviewLayoutMargins(
&self,
preserves_superview_layout_margins: bool,
)
pub unsafe fn setPreservesSuperviewLayoutMargins( &self, preserves_superview_layout_margins: bool, )
Setter for preservesSuperviewLayoutMargins
.
pub unsafe fn insetsLayoutMarginsFromSafeArea(&self) -> bool
Sourcepub unsafe fn setInsetsLayoutMarginsFromSafeArea(
&self,
insets_layout_margins_from_safe_area: bool,
)
pub unsafe fn setInsetsLayoutMarginsFromSafeArea( &self, insets_layout_margins_from_safe_area: bool, )
Setter for insetsLayoutMarginsFromSafeArea
.
pub unsafe fn layoutMarginsDidChange(&self)
pub fn safeAreaInsets(&self) -> UIEdgeInsets
UIGeometry
and objc2-core-foundation
only.pub unsafe fn safeAreaInsetsDidChange(&self)
pub unsafe fn layoutMarginsGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide
only.Sourcepub unsafe fn readableContentGuide(&self) -> Retained<UILayoutGuide>
Available on crate feature UILayoutGuide
only.
pub unsafe fn readableContentGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide
only.This content guide provides a layout area that you can use to place text and related content whose width should generally be constrained to a size that is easy for the user to read. This guide provides a centered region that you can place content within to get this behavior for this view.
pub unsafe fn safeAreaLayoutGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide
only.Sourcepub unsafe fn keyboardLayoutGuide(&self) -> Retained<UIKeyboardLayoutGuide>
Available on crate features UIKeyboardLayoutGuide
and UILayoutGuide
and UITrackingLayoutGuide
only.
pub unsafe fn keyboardLayoutGuide(&self) -> Retained<UIKeyboardLayoutGuide>
UIKeyboardLayoutGuide
and UILayoutGuide
and UITrackingLayoutGuide
only.Follows the keyboard when on screen and docked. See UIKeyboardLayoutGuide.h for additional options.
pub unsafe fn drawRect(&self, rect: CGRect)
objc2-core-foundation
only.pub fn setNeedsDisplay(&self)
pub unsafe fn setNeedsDisplayInRect(&self, rect: CGRect)
objc2-core-foundation
only.pub unsafe fn clipsToBounds(&self) -> bool
Sourcepub unsafe fn setClipsToBounds(&self, clips_to_bounds: bool)
pub unsafe fn setClipsToBounds(&self, clips_to_bounds: bool)
Setter for clipsToBounds
.
pub fn backgroundColor(&self) -> Option<Retained<UIColor>>
UIColor
only.Sourcepub fn setBackgroundColor(&self, background_color: Option<&UIColor>)
Available on crate feature UIColor
only.
pub fn setBackgroundColor(&self, background_color: Option<&UIColor>)
UIColor
only.Setter for backgroundColor
.
pub unsafe fn alpha(&self) -> CGFloat
objc2-core-foundation
only.Sourcepub unsafe fn setAlpha(&self, alpha: CGFloat)
Available on crate feature objc2-core-foundation
only.
pub unsafe fn setAlpha(&self, alpha: CGFloat)
objc2-core-foundation
only.Setter for alpha
.
pub unsafe fn isOpaque(&self) -> bool
pub unsafe fn clearsContextBeforeDrawing(&self) -> bool
Sourcepub unsafe fn setClearsContextBeforeDrawing(
&self,
clears_context_before_drawing: bool,
)
pub unsafe fn setClearsContextBeforeDrawing( &self, clears_context_before_drawing: bool, )
Setter for clearsContextBeforeDrawing
.
pub fn isHidden(&self) -> bool
pub unsafe fn contentMode(&self) -> UIViewContentMode
Sourcepub unsafe fn setContentMode(&self, content_mode: UIViewContentMode)
pub unsafe fn setContentMode(&self, content_mode: UIViewContentMode)
Setter for contentMode
.
pub unsafe fn contentStretch(&self) -> CGRect
objc2-core-foundation
only.Sourcepub unsafe fn setContentStretch(&self, content_stretch: CGRect)
👎DeprecatedAvailable on crate feature objc2-core-foundation
only.
pub unsafe fn setContentStretch(&self, content_stretch: CGRect)
objc2-core-foundation
only.Setter for contentStretch
.
pub unsafe fn maskView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn setMaskView(&self, mask_view: Option<&UIView>)
pub unsafe fn setMaskView(&self, mask_view: Option<&UIView>)
Setter for maskView
.
pub unsafe fn tintColor(&self) -> Option<Retained<UIColor>>
UIColor
only.Sourcepub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>)
Available on crate feature UIColor
only.
pub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>)
UIColor
only.Setter for tintColor
.
pub unsafe fn tintAdjustmentMode(&self) -> UIViewTintAdjustmentMode
Sourcepub unsafe fn setTintAdjustmentMode(
&self,
tint_adjustment_mode: UIViewTintAdjustmentMode,
)
pub unsafe fn setTintAdjustmentMode( &self, tint_adjustment_mode: UIViewTintAdjustmentMode, )
Setter for tintAdjustmentMode
.
pub unsafe fn tintColorDidChange(&self)
pub fn gestureRecognizers( &self, ) -> Option<Retained<NSArray<UIGestureRecognizer>>>
UIGestureRecognizer
only.Sourcepub unsafe fn setGestureRecognizers(
&self,
gesture_recognizers: Option<&NSArray<UIGestureRecognizer>>,
)
Available on crate feature UIGestureRecognizer
only.
pub unsafe fn setGestureRecognizers( &self, gesture_recognizers: Option<&NSArray<UIGestureRecognizer>>, )
UIGestureRecognizer
only.Setter for gestureRecognizers
.
pub fn addGestureRecognizer(&self, gesture_recognizer: &UIGestureRecognizer)
UIGestureRecognizer
only.pub fn removeGestureRecognizer(&self, gesture_recognizer: &UIGestureRecognizer)
UIGestureRecognizer
only.pub fn gestureRecognizerShouldBegin( &self, gesture_recognizer: &UIGestureRecognizer, ) -> bool
UIGestureRecognizer
only.Sourcepub unsafe fn addMotionEffect(&self, effect: &UIMotionEffect)
Available on crate feature UIMotionEffect
only.
pub unsafe fn addMotionEffect(&self, effect: &UIMotionEffect)
UIMotionEffect
only.Begins applying effect
to the receiver. The effect’s emitted keyPath/value pairs will be
applied to the view’s presentation layer.
Animates the transition to the motion effect’s values using the present UIView animation context.
Sourcepub unsafe fn removeMotionEffect(&self, effect: &UIMotionEffect)
Available on crate feature UIMotionEffect
only.
pub unsafe fn removeMotionEffect(&self, effect: &UIMotionEffect)
UIMotionEffect
only.Stops applying effect
to the receiver. Any affected presentation values will animate to
their post-removal values using the present UIView animation context.
pub unsafe fn motionEffects(&self) -> Retained<NSArray<UIMotionEffect>>
UIMotionEffect
only.Sourcepub unsafe fn setMotionEffects(&self, motion_effects: &NSArray<UIMotionEffect>)
Available on crate feature UIMotionEffect
only.
pub unsafe fn setMotionEffects(&self, motion_effects: &NSArray<UIMotionEffect>)
UIMotionEffect
only.Setter for motionEffects
.
pub unsafe fn constraints(&self) -> Retained<NSArray<NSLayoutConstraint>>
NSLayoutConstraint
only.pub unsafe fn addConstraint(&self, constraint: &NSLayoutConstraint)
NSLayoutConstraint
only.pub unsafe fn addConstraints(&self, constraints: &NSArray<NSLayoutConstraint>)
NSLayoutConstraint
only.pub unsafe fn removeConstraint(&self, constraint: &NSLayoutConstraint)
NSLayoutConstraint
only.pub unsafe fn removeConstraints( &self, constraints: &NSArray<NSLayoutConstraint>, )
NSLayoutConstraint
only.pub unsafe fn updateConstraintsIfNeeded(&self)
pub unsafe fn updateConstraints(&self)
pub unsafe fn needsUpdateConstraints(&self) -> bool
pub unsafe fn setNeedsUpdateConstraints(&self)
pub unsafe fn translatesAutoresizingMaskIntoConstraints(&self) -> bool
Sourcepub unsafe fn setTranslatesAutoresizingMaskIntoConstraints(
&self,
translates_autoresizing_mask_into_constraints: bool,
)
pub unsafe fn setTranslatesAutoresizingMaskIntoConstraints( &self, translates_autoresizing_mask_into_constraints: bool, )
Setter for translatesAutoresizingMaskIntoConstraints
.
pub unsafe fn alignmentRectForFrame(&self, frame: CGRect) -> CGRect
objc2-core-foundation
only.pub unsafe fn frameForAlignmentRect(&self, alignment_rect: CGRect) -> CGRect
objc2-core-foundation
only.pub unsafe fn alignmentRectInsets(&self) -> UIEdgeInsets
UIGeometry
and objc2-core-foundation
only.pub unsafe fn viewForBaselineLayout(&self) -> Retained<UIView>
pub unsafe fn viewForFirstBaselineLayout(&self) -> Retained<UIView>
pub unsafe fn viewForLastBaselineLayout(&self) -> Retained<UIView>
pub unsafe fn intrinsicContentSize(&self) -> CGSize
objc2-core-foundation
only.pub unsafe fn invalidateIntrinsicContentSize(&self)
pub unsafe fn contentHuggingPriorityForAxis( &self, axis: UILayoutConstraintAxis, ) -> UILayoutPriority
NSLayoutConstraint
only.pub unsafe fn setContentHuggingPriority_forAxis( &self, priority: UILayoutPriority, axis: UILayoutConstraintAxis, )
NSLayoutConstraint
only.pub unsafe fn contentCompressionResistancePriorityForAxis( &self, axis: UILayoutConstraintAxis, ) -> UILayoutPriority
NSLayoutConstraint
only.pub unsafe fn setContentCompressionResistancePriority_forAxis( &self, priority: UILayoutPriority, axis: UILayoutConstraintAxis, )
NSLayoutConstraint
only.pub unsafe fn systemLayoutSizeFittingSize(&self, target_size: CGSize) -> CGSize
objc2-core-foundation
only.pub unsafe fn systemLayoutSizeFittingSize_withHorizontalFittingPriority_verticalFittingPriority( &self, target_size: CGSize, horizontal_fitting_priority: UILayoutPriority, vertical_fitting_priority: UILayoutPriority, ) -> CGSize
NSLayoutConstraint
and objc2-core-foundation
only.pub unsafe fn layoutGuides(&self) -> Retained<NSArray<UILayoutGuide>>
UILayoutGuide
only.pub unsafe fn addLayoutGuide(&self, layout_guide: &UILayoutGuide)
UILayoutGuide
only.pub unsafe fn removeLayoutGuide(&self, layout_guide: &UILayoutGuide)
UILayoutGuide
only.pub unsafe fn leadingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn trailingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn leftAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn rightAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn topAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn bottomAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn widthAnchor(&self) -> Retained<NSLayoutDimension>
NSLayoutAnchor
only.pub unsafe fn heightAnchor(&self) -> Retained<NSLayoutDimension>
NSLayoutAnchor
only.pub unsafe fn centerXAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn centerYAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn firstBaselineAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn lastBaselineAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor
only.pub unsafe fn constraintsAffectingLayoutForAxis( &self, axis: UILayoutConstraintAxis, ) -> Retained<NSArray<NSLayoutConstraint>>
NSLayoutConstraint
only.pub unsafe fn hasAmbiguousLayout(&self) -> bool
pub unsafe fn exerciseAmbiguityInLayout(&self)
pub unsafe fn restorationIdentifier(&self) -> Option<Retained<NSString>>
Sourcepub unsafe fn setRestorationIdentifier(
&self,
restoration_identifier: Option<&NSString>,
)
pub unsafe fn setRestorationIdentifier( &self, restoration_identifier: Option<&NSString>, )
Setter for restorationIdentifier
.
pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder)
pub unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder)
pub unsafe fn snapshotViewAfterScreenUpdates( &self, after_updates: bool, ) -> Option<Retained<UIView>>
pub unsafe fn resizableSnapshotViewFromRect_afterScreenUpdates_withCapInsets( &self, rect: CGRect, after_updates: bool, cap_insets: UIEdgeInsets, ) -> Option<Retained<UIView>>
UIGeometry
and objc2-core-foundation
only.pub unsafe fn drawViewHierarchyInRect_afterScreenUpdates( &self, rect: CGRect, after_updates: bool, ) -> bool
objc2-core-foundation
only.pub unsafe fn overrideUserInterfaceStyle(&self) -> UIUserInterfaceStyle
UIInterface
only.Sourcepub unsafe fn setOverrideUserInterfaceStyle(
&self,
override_user_interface_style: UIUserInterfaceStyle,
)
Available on crate feature UIInterface
only.
pub unsafe fn setOverrideUserInterfaceStyle( &self, override_user_interface_style: UIUserInterfaceStyle, )
UIInterface
only.Setter for overrideUserInterfaceStyle
.
Sourcepub unsafe fn minimumContentSizeCategory(
&self,
) -> Option<Retained<UIContentSizeCategory>>
Available on crate feature UIContentSizeCategory
only.
pub unsafe fn minimumContentSizeCategory( &self, ) -> Option<Retained<UIContentSizeCategory>>
UIContentSizeCategory
only.Specify content size category limits. Setting one or both of these properties will limit the content size category for this view (and its subviews) to a minimum or a maximum value. You can use this to limit the support content size categories on part of your view hierarchy. Setting this to nil removes the limit on the minimum or maximum. Limits will be applied immediately and when future content size category updates occur.
Specifying a minimum limit that is greater than the maximum limit (or vice versa) will effectively only use the maximum limit.
Example:
// limit the support content size categories between .medium and .accessibilityExtraLarge (included). view.minimumContentSizeCategory = UIContentSizeCategoryMedium; view.maximumContentSizeCategory = UIContentSizeCategoryAccessibilityExtraLarge;
Sourcepub unsafe fn setMinimumContentSizeCategory(
&self,
minimum_content_size_category: Option<&UIContentSizeCategory>,
)
Available on crate feature UIContentSizeCategory
only.
pub unsafe fn setMinimumContentSizeCategory( &self, minimum_content_size_category: Option<&UIContentSizeCategory>, )
UIContentSizeCategory
only.Setter for minimumContentSizeCategory
.
pub unsafe fn maximumContentSizeCategory( &self, ) -> Option<Retained<UIContentSizeCategory>>
UIContentSizeCategory
only.Sourcepub unsafe fn setMaximumContentSizeCategory(
&self,
maximum_content_size_category: Option<&UIContentSizeCategory>,
)
Available on crate feature UIContentSizeCategory
only.
pub unsafe fn setMaximumContentSizeCategory( &self, maximum_content_size_category: Option<&UIContentSizeCategory>, )
UIContentSizeCategory
only.Setter for maximumContentSizeCategory
.
Sourcepub unsafe fn appliedContentSizeCategoryLimitsDescription(
&self,
) -> Retained<NSString>
pub unsafe fn appliedContentSizeCategoryLimitsDescription( &self, ) -> Retained<NSString>
Will return a string with a log of all the superviews of this view, alongside with what content size category each view has and if that view has limits applied. This is for debugging purposes only.
pub unsafe fn traitOverrides( &self, ) -> Retained<ProtocolObject<dyn UITraitOverrides>>
UITraitCollection
only.Sourcepub unsafe fn updateTraitsIfNeeded(&self)
pub unsafe fn updateTraitsIfNeeded(&self)
Forces an immediate trait update for this view (and its view controller, if applicable) and any subviews, including any view controllers or views in its subtree. Any trait change callbacks are sent synchronously.
Methods from Deref<Target = UIResponder>§
pub unsafe fn nextResponder(&self) -> Option<Retained<UIResponder>>
pub unsafe fn canBecomeFirstResponder(&self) -> bool
pub unsafe fn becomeFirstResponder(&self) -> bool
pub unsafe fn canResignFirstResponder(&self) -> bool
pub unsafe fn resignFirstResponder(&self) -> bool
pub unsafe fn isFirstResponder(&self) -> bool
pub unsafe fn touchesBegan_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent
and UITouch
only.pub unsafe fn touchesMoved_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent
and UITouch
only.pub unsafe fn touchesEnded_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent
and UITouch
only.pub unsafe fn touchesCancelled_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent
and UITouch
only.pub unsafe fn touchesEstimatedPropertiesUpdated(&self, touches: &NSSet<UITouch>)
UITouch
only.pub unsafe fn pressesBegan_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent
and UIPress
and UIPressesEvent
only.pub unsafe fn pressesChanged_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent
and UIPress
and UIPressesEvent
only.pub unsafe fn pressesEnded_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent
and UIPress
and UIPressesEvent
only.pub unsafe fn pressesCancelled_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent
and UIPress
and UIPressesEvent
only.pub unsafe fn motionBegan_withEvent( &self, motion: UIEventSubtype, event: Option<&UIEvent>, )
UIEvent
only.pub unsafe fn motionEnded_withEvent( &self, motion: UIEventSubtype, event: Option<&UIEvent>, )
UIEvent
only.pub unsafe fn motionCancelled_withEvent( &self, motion: UIEventSubtype, event: Option<&UIEvent>, )
UIEvent
only.pub unsafe fn remoteControlReceivedWithEvent(&self, event: Option<&UIEvent>)
UIEvent
only.pub unsafe fn canPerformAction_withSender( &self, action: Sel, sender: Option<&AnyObject>, ) -> bool
pub unsafe fn targetForAction_withSender( &self, action: Sel, sender: Option<&AnyObject>, ) -> Option<Retained<AnyObject>>
pub unsafe fn buildMenuWithBuilder( &self, builder: &ProtocolObject<dyn UIMenuBuilder>, )
UIMenuBuilder
only.pub unsafe fn validateCommand(&self, command: &UICommand)
UICommand
and UIMenuElement
only.pub unsafe fn undoManager(&self) -> Option<Retained<NSUndoManager>>
pub unsafe fn editingInteractionConfiguration( &self, ) -> UIEditingInteractionConfiguration
pub unsafe fn keyCommands(&self) -> Option<Retained<NSArray<UIKeyCommand>>>
UICommand
and UIKeyCommand
and UIMenuElement
only.pub unsafe fn inputView(&self) -> Option<Retained<UIView>>
pub unsafe fn inputAccessoryView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn inputAssistantItem(&self) -> Retained<UITextInputAssistantItem>
Available on crate feature UITextInput
only.
pub unsafe fn inputAssistantItem(&self) -> Retained<UITextInputAssistantItem>
UITextInput
only.This method is for clients that wish to put buttons on the Shortcuts Bar, shown on top of the keyboard. You may modify the returned inputAssistantItem to add to or replace the existing items on the bar. Modifications made to the returned UITextInputAssistantItem are reflected automatically. This method should not be overridden. Goes up the responder chain.
pub unsafe fn inputViewController( &self, ) -> Option<Retained<UIInputViewController>>
UIInputViewController
and UIViewController
only.pub unsafe fn inputAccessoryViewController( &self, ) -> Option<Retained<UIInputViewController>>
UIInputViewController
and UIViewController
only.pub unsafe fn textInputMode(&self) -> Option<Retained<UITextInputMode>>
UITextInput
only.pub unsafe fn textInputContextIdentifier(&self) -> Option<Retained<NSString>>
pub unsafe fn reloadInputViews(&self)
pub unsafe fn userActivity(&self) -> Option<Retained<NSUserActivity>>
Sourcepub unsafe fn setUserActivity(&self, user_activity: Option<&NSUserActivity>)
pub unsafe fn setUserActivity(&self, user_activity: Option<&NSUserActivity>)
Setter for userActivity
.
pub unsafe fn updateUserActivityState(&self, activity: &NSUserActivity)
pub unsafe fn restoreUserActivityState(&self, activity: &NSUserActivity)
pub unsafe fn captureTextFromCamera(&self, sender: Option<&AnyObject>)
pub unsafe fn activityItemsConfiguration( &self, ) -> Option<Retained<ProtocolObject<dyn UIActivityItemsConfigurationReading>>>
UIResponder_UIActivityItemsConfiguration
and UIActivityItemsConfigurationReading
only.Sourcepub unsafe fn setActivityItemsConfiguration(
&self,
activity_items_configuration: Option<&ProtocolObject<dyn UIActivityItemsConfigurationReading>>,
)
Available on crate features UIResponder_UIActivityItemsConfiguration
and UIActivityItemsConfigurationReading
only.
pub unsafe fn setActivityItemsConfiguration( &self, activity_items_configuration: Option<&ProtocolObject<dyn UIActivityItemsConfigurationReading>>, )
UIResponder_UIActivityItemsConfiguration
and UIActivityItemsConfigurationReading
only.Setter for activityItemsConfiguration
.
Methods from Deref<Target = NSObject>§
Sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
Sourcepub fn class(&self) -> &'static AnyClass
Available on crate feature UIIndirectScribbleInteraction
only.
pub fn class(&self) -> &'static AnyClass
UIIndirectScribbleInteraction
only.Dynamically find the class of this object.
§Panics
May panic if the object is invalid (which may be the case for objects
returned from unavailable init
/new
methods).
§Example
Check that an instance of NSObject
has the precise class NSObject
.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.Available on crate feature UIIndirectScribbleInteraction
only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.UIIndirectScribbleInteraction
only.Use Ivar::load
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastTarget,
Available on crate feature UIIndirectScribbleInteraction
only.
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastTarget,
UIIndirectScribbleInteraction
only.Attempt to downcast the object to a class of type T
.
This is the reference-variant. Use Retained::downcast
if you want
to convert a retained object to another type.
§Mutable classes
Some classes have immutable and mutable variants, such as NSString
and NSMutableString
.
When some Objective-C API signature says it gives you an immutable class, it generally expects you to not mutate that, even though it may technically be mutable “under the hood”.
So using this method to convert a NSString
to a NSMutableString
,
while not unsound, is generally frowned upon unless you created the
string yourself, or the API explicitly documents the string to be
mutable.
See Apple’s documentation on mutability and on
isKindOfClass:
for more details.
§Generic classes
Objective-C generics are called “lightweight generics”, and that’s because they aren’t exposed in the runtime. This makes it impossible to safely downcast to generic collections, so this is disallowed by this method.
You can, however, safely downcast to generic collections where all the
type-parameters are AnyObject
.
§Panics
This works internally by calling isKindOfClass:
. That means that the
object must have the instance method of that name, and an exception
will be thrown (if CoreFoundation is linked) or the process will abort
if that is not the case. In the vast majority of cases, you don’t need
to worry about this, since both root objects NSObject
and
NSProxy
implement this method.
§Examples
Cast an NSString
back and forth from NSObject
.
use objc2::rc::Retained;
use objc2_foundation::{NSObject, NSString};
let obj: Retained<NSObject> = NSString::new().into_super();
let string = obj.downcast_ref::<NSString>().unwrap();
// Or with `downcast`, if we do not need the object afterwards
let string = obj.downcast::<NSString>().unwrap();
Try (and fail) to cast an NSObject
to an NSString
.
use objc2_foundation::{NSObject, NSString};
let obj = NSObject::new();
assert!(obj.downcast_ref::<NSString>().is_none());
Try to cast to an array of strings.
use objc2_foundation::{NSArray, NSObject, NSString};
let arr = NSArray::from_retained_slice(&[NSObject::new()]);
// This is invalid and doesn't type check.
let arr = arr.downcast_ref::<NSArray<NSString>>();
This fails to compile, since it would require enumerating over the array to ensure that each element is of the desired type, which is a performance pitfall.
Downcast when processing each element instead.
use objc2_foundation::{NSArray, NSObject, NSString};
let arr = NSArray::from_retained_slice(&[NSObject::new()]);
for elem in arr {
if let Some(data) = elem.downcast_ref::<NSString>() {
// handle `data`
}
}
Trait Implementations§
Source§impl AsRef<AnyObject> for UISearchTextField
impl AsRef<AnyObject> for UISearchTextField
Source§impl AsRef<NSObject> for UISearchTextField
impl AsRef<NSObject> for UISearchTextField
Source§impl AsRef<UIControl> for UISearchTextField
impl AsRef<UIControl> for UISearchTextField
Source§impl AsRef<UIResponder> for UISearchTextField
impl AsRef<UIResponder> for UISearchTextField
Source§fn as_ref(&self) -> &UIResponder
fn as_ref(&self) -> &UIResponder
Source§impl AsRef<UISearchTextField> for UISearchTextField
impl AsRef<UISearchTextField> for UISearchTextField
Source§impl AsRef<UITextField> for UISearchTextField
impl AsRef<UITextField> for UISearchTextField
Source§fn as_ref(&self) -> &UITextField
fn as_ref(&self) -> &UITextField
Source§impl AsRef<UIView> for UISearchTextField
impl AsRef<UIView> for UISearchTextField
Source§impl Borrow<AnyObject> for UISearchTextField
impl Borrow<AnyObject> for UISearchTextField
Source§impl Borrow<NSObject> for UISearchTextField
impl Borrow<NSObject> for UISearchTextField
Source§impl Borrow<UIControl> for UISearchTextField
impl Borrow<UIControl> for UISearchTextField
Source§impl Borrow<UIResponder> for UISearchTextField
impl Borrow<UIResponder> for UISearchTextField
Source§fn borrow(&self) -> &UIResponder
fn borrow(&self) -> &UIResponder
Source§impl Borrow<UITextField> for UISearchTextField
impl Borrow<UITextField> for UISearchTextField
Source§fn borrow(&self) -> &UITextField
fn borrow(&self) -> &UITextField
Source§impl Borrow<UIView> for UISearchTextField
impl Borrow<UIView> for UISearchTextField
Source§impl CALayerDelegate for UISearchTextField
impl CALayerDelegate for UISearchTextField
unsafe fn displayLayer(&self, layer: &CALayer)
unsafe fn layerWillDraw(&self, layer: &CALayer)
unsafe fn layoutSublayersOfLayer(&self, layer: &CALayer)
unsafe fn actionForLayer_forKey( &self, layer: &CALayer, event: &NSString, ) -> Option<Retained<ProtocolObject<dyn CAAction>>>
Source§impl ClassType for UISearchTextField
impl ClassType for UISearchTextField
Source§const NAME: &'static str = "UISearchTextField"
const NAME: &'static str = "UISearchTextField"
Source§type Super = UITextField
type Super = UITextField
Source§type ThreadKind = dyn MainThreadOnly
type ThreadKind = dyn MainThreadOnly
Source§impl Debug for UISearchTextField
impl Debug for UISearchTextField
Source§impl Deref for UISearchTextField
impl Deref for UISearchTextField
Source§impl Hash for UISearchTextField
impl Hash for UISearchTextField
Source§impl Message for UISearchTextField
impl Message for UISearchTextField
Source§impl NSCoding for UISearchTextField
impl NSCoding for UISearchTextField
Source§impl NSObjectProtocol for UISearchTextField
impl NSObjectProtocol for UISearchTextField
Source§fn isEqual(&self, other: Option<&AnyObject>) -> bool
fn isEqual(&self, other: Option<&AnyObject>) -> bool
Source§fn hash(&self) -> usize
fn hash(&self) -> usize
Source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
isKindOfClass
directly, or cast your objects with AnyObject::downcast_ref
Source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
Source§impl PartialEq for UISearchTextField
impl PartialEq for UISearchTextField
Source§impl RefEncode for UISearchTextField
impl RefEncode for UISearchTextField
Source§const ENCODING_REF: Encoding = <UITextField as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <UITextField as ::objc2::RefEncode>::ENCODING_REF
Source§impl UIAppearance for UISearchTextField
impl UIAppearance for UISearchTextField
Source§unsafe fn appearance(mtm: MainThreadMarker) -> Retained<Self>
unsafe fn appearance(mtm: MainThreadMarker) -> Retained<Self>
UIAppearance
only.Source§unsafe fn appearanceWhenContainedInInstancesOfClasses(
container_types: &NSArray<AnyClass>,
mtm: MainThreadMarker,
) -> Retained<Self>
unsafe fn appearanceWhenContainedInInstancesOfClasses( container_types: &NSArray<AnyClass>, mtm: MainThreadMarker, ) -> Retained<Self>
UIAppearance
only.Source§unsafe fn appearanceForTraitCollection(
trait: &UITraitCollection,
mtm: MainThreadMarker,
) -> Retained<Self>
unsafe fn appearanceForTraitCollection( trait: &UITraitCollection, mtm: MainThreadMarker, ) -> Retained<Self>
UIAppearance
and UITraitCollection
only.Source§unsafe fn appearanceForTraitCollection_whenContainedInInstancesOfClasses(
trait: &UITraitCollection,
container_types: &NSArray<AnyClass>,
mtm: MainThreadMarker,
) -> Retained<Self>
unsafe fn appearanceForTraitCollection_whenContainedInInstancesOfClasses( trait: &UITraitCollection, container_types: &NSArray<AnyClass>, mtm: MainThreadMarker, ) -> Retained<Self>
UIAppearance
and UITraitCollection
only.Source§impl UIContentSizeCategoryAdjusting for UISearchTextField
impl UIContentSizeCategoryAdjusting for UISearchTextField
Source§unsafe fn adjustsFontForContentSizeCategory(&self) -> bool
unsafe fn adjustsFontForContentSizeCategory(&self) -> bool
UIContentSizeCategoryAdjusting
only.Source§unsafe fn setAdjustsFontForContentSizeCategory(
&self,
adjusts_font_for_content_size_category: bool,
)
unsafe fn setAdjustsFontForContentSizeCategory( &self, adjusts_font_for_content_size_category: bool, )
UIContentSizeCategoryAdjusting
only.adjustsFontForContentSizeCategory
.Source§impl UICoordinateSpace for UISearchTextField
impl UICoordinateSpace for UISearchTextField
Source§fn convertPoint_toCoordinateSpace(
&self,
point: CGPoint,
coordinate_space: &ProtocolObject<dyn UICoordinateSpace>,
) -> CGPoint
fn convertPoint_toCoordinateSpace( &self, point: CGPoint, coordinate_space: &ProtocolObject<dyn UICoordinateSpace>, ) -> CGPoint
UIView
and objc2-core-foundation
only.Source§fn convertPoint_fromCoordinateSpace(
&self,
point: CGPoint,
coordinate_space: &ProtocolObject<dyn UICoordinateSpace>,
) -> CGPoint
fn convertPoint_fromCoordinateSpace( &self, point: CGPoint, coordinate_space: &ProtocolObject<dyn UICoordinateSpace>, ) -> CGPoint
UIView
and objc2-core-foundation
only.Source§fn convertRect_toCoordinateSpace(
&self,
rect: CGRect,
coordinate_space: &ProtocolObject<dyn UICoordinateSpace>,
) -> CGRect
fn convertRect_toCoordinateSpace( &self, rect: CGRect, coordinate_space: &ProtocolObject<dyn UICoordinateSpace>, ) -> CGRect
UIView
and objc2-core-foundation
only.Source§fn convertRect_fromCoordinateSpace(
&self,
rect: CGRect,
coordinate_space: &ProtocolObject<dyn UICoordinateSpace>,
) -> CGRect
fn convertRect_fromCoordinateSpace( &self, rect: CGRect, coordinate_space: &ProtocolObject<dyn UICoordinateSpace>, ) -> CGRect
UIView
and objc2-core-foundation
only.Source§impl UIDynamicItem for UISearchTextField
impl UIDynamicItem for UISearchTextField
Source§unsafe fn center(&self) -> CGPoint
unsafe fn center(&self) -> CGPoint
UIDynamicBehavior
and objc2-core-foundation
only.Source§unsafe fn setCenter(&self, center: CGPoint)
unsafe fn setCenter(&self, center: CGPoint)
UIDynamicBehavior
and objc2-core-foundation
only.center
.Source§unsafe fn bounds(&self) -> CGRect
unsafe fn bounds(&self) -> CGRect
UIDynamicBehavior
and objc2-core-foundation
only.Source§unsafe fn transform(&self) -> CGAffineTransform
unsafe fn transform(&self) -> CGAffineTransform
UIDynamicBehavior
and objc2-core-foundation
only.Source§unsafe fn setTransform(&self, transform: CGAffineTransform)
unsafe fn setTransform(&self, transform: CGAffineTransform)
UIDynamicBehavior
and objc2-core-foundation
only.transform
.Source§unsafe fn collisionBoundsType(&self) -> UIDynamicItemCollisionBoundsType
unsafe fn collisionBoundsType(&self) -> UIDynamicItemCollisionBoundsType
UIDynamicBehavior
only.Source§unsafe fn collisionBoundingPath(&self) -> Retained<UIBezierPath>
unsafe fn collisionBoundingPath(&self) -> Retained<UIBezierPath>
UIDynamicBehavior
and UIBezierPath
only.Source§impl UIFocusEnvironment for UISearchTextField
impl UIFocusEnvironment for UISearchTextField
Source§unsafe fn preferredFocusEnvironments(
&self,
) -> Retained<NSArray<ProtocolObject<dyn UIFocusEnvironment>>>
unsafe fn preferredFocusEnvironments( &self, ) -> Retained<NSArray<ProtocolObject<dyn UIFocusEnvironment>>>
UIFocus
only.Source§unsafe fn parentFocusEnvironment(
&self,
) -> Option<Retained<ProtocolObject<dyn UIFocusEnvironment>>>
unsafe fn parentFocusEnvironment( &self, ) -> Option<Retained<ProtocolObject<dyn UIFocusEnvironment>>>
UIFocus
only.Source§unsafe fn focusItemContainer(
&self,
) -> Option<Retained<ProtocolObject<dyn UIFocusItemContainer>>>
unsafe fn focusItemContainer( &self, ) -> Option<Retained<ProtocolObject<dyn UIFocusItemContainer>>>
UIFocus
only.Source§unsafe fn setNeedsFocusUpdate(&self)
unsafe fn setNeedsFocusUpdate(&self)
UIFocus
only.[[UIFocusSystem focusSystemForEnvironment:self] requestFocusUpdateToEnvironment:self]
;Source§unsafe fn updateFocusIfNeeded(&self)
unsafe fn updateFocusIfNeeded(&self)
UIFocus
only.[[UIFocusSystem focusSystemForEnvironment:self] updateFocusIfNeeded];
.Source§unsafe fn shouldUpdateFocusInContext(
&self,
context: &UIFocusUpdateContext,
) -> bool
unsafe fn shouldUpdateFocusInContext( &self, context: &UIFocusUpdateContext, ) -> bool
UIFocus
only.Source§unsafe fn didUpdateFocusInContext_withAnimationCoordinator(
&self,
context: &UIFocusUpdateContext,
coordinator: &UIFocusAnimationCoordinator,
)
unsafe fn didUpdateFocusInContext_withAnimationCoordinator( &self, context: &UIFocusUpdateContext, coordinator: &UIFocusAnimationCoordinator, )
UIFocus
and UIFocusAnimationCoordinator
only.Source§unsafe fn soundIdentifierForFocusUpdateInContext(
&self,
context: &UIFocusUpdateContext,
) -> Option<Retained<UIFocusSoundIdentifier>>
unsafe fn soundIdentifierForFocusUpdateInContext( &self, context: &UIFocusUpdateContext, ) -> Option<Retained<UIFocusSoundIdentifier>>
UIFocus
only.Source§impl UIFocusItem for UISearchTextField
impl UIFocusItem for UISearchTextField
Source§unsafe fn canBecomeFocused(&self) -> bool
unsafe fn canBecomeFocused(&self) -> bool
UIFocus
only.Source§unsafe fn frame(&self) -> CGRect
unsafe fn frame(&self) -> CGRect
UIFocus
and objc2-core-foundation
only.coordinateSpace
of the UIFocusItemContainer in which it is contained.Source§unsafe fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
unsafe fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
UIFocus
and UIFocusEffect
only.Source§unsafe fn focusGroupPriority(&self) -> UIFocusGroupPriority
unsafe fn focusGroupPriority(&self) -> UIFocusGroupPriority
UIFocus
only.Source§unsafe fn focusItemDeferralMode(&self) -> UIFocusItemDeferralMode
unsafe fn focusItemDeferralMode(&self) -> UIFocusItemDeferralMode
UIFocus
only.UIFocusItemDeferralModeNever
, the focus deferral will not be enabled again
after the user engagement timeout has expired if this item is currently focused and programmatic focus updates pointing
to this item will be executed immediatly. If it returns UIFocusItemDeferralModeAlways
focus will always be deferred
when this item is supposed to be focused.
Does nothing when focus deferral is not supported on the platform.Source§unsafe fn isTransparentFocusItem(&self) -> bool
unsafe fn isTransparentFocusItem(&self) -> bool
UIFocus
only.Source§unsafe fn didHintFocusMovement(&self, hint: &UIFocusMovementHint)
unsafe fn didHintFocusMovement(&self, hint: &UIFocusMovementHint)
UIFocus
and UIFocusMovementHint
only.Source§impl UIFocusItemContainer for UISearchTextField
impl UIFocusItemContainer for UISearchTextField
Source§unsafe fn coordinateSpace(
&self,
) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
unsafe fn coordinateSpace( &self, ) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
UIFocus
and UIView
only.Source§unsafe fn focusItemsInRect(
&self,
rect: CGRect,
) -> Retained<NSArray<ProtocolObject<dyn UIFocusItem>>>
unsafe fn focusItemsInRect( &self, rect: CGRect, ) -> Retained<NSArray<ProtocolObject<dyn UIFocusItem>>>
UIFocus
and objc2-core-foundation
only.rect
is expressed in coordinateSpace
.
Note: starting in iOS
&
tvOS 16.0, UIView will return its subviews from this method. If you override this method in a UIView subclass, it will be your responsibility to call super and merge your array of custom focus items with UIView’s default focus items.Source§impl UIKeyInput for UISearchTextField
impl UIKeyInput for UISearchTextField
Source§unsafe fn hasText(&self) -> bool
unsafe fn hasText(&self) -> bool
UITextInput
and UITextInputTraits
only.Source§unsafe fn insertText(&self, text: &NSString)
unsafe fn insertText(&self, text: &NSString)
UITextInput
and UITextInputTraits
only.Source§unsafe fn deleteBackward(&self)
unsafe fn deleteBackward(&self)
UITextInput
and UITextInputTraits
only.Source§impl UILetterformAwareAdjusting for UISearchTextField
impl UILetterformAwareAdjusting for UISearchTextField
Source§unsafe fn sizingRule(&self) -> UILetterformAwareSizingRule
unsafe fn sizingRule(&self) -> UILetterformAwareSizingRule
UILetterformAwareAdjusting
only.sizingRule
defaults to UILetterformAwareSizingRuleTypographic
and determines what rule is used during the calculation of -sizeThatFits:
and -intrinsicContentSize
Source§unsafe fn setSizingRule(&self, sizing_rule: UILetterformAwareSizingRule)
unsafe fn setSizingRule(&self, sizing_rule: UILetterformAwareSizingRule)
UILetterformAwareAdjusting
only.sizingRule
.Source§impl UIResponderStandardEditActions for UISearchTextField
impl UIResponderStandardEditActions for UISearchTextField
Source§unsafe fn copy(&self, sender: Option<&AnyObject>)
unsafe fn copy(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn paste(&self, sender: Option<&AnyObject>)
unsafe fn paste(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn pasteAndMatchStyle(&self, sender: Option<&AnyObject>)
unsafe fn pasteAndMatchStyle(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn pasteAndGo(&self, sender: Option<&AnyObject>)
unsafe fn pasteAndGo(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn pasteAndSearch(&self, sender: Option<&AnyObject>)
unsafe fn pasteAndSearch(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn select(&self, sender: Option<&AnyObject>)
unsafe fn select(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn selectAll(&self, sender: Option<&AnyObject>)
unsafe fn selectAll(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn delete(&self, sender: Option<&AnyObject>)
unsafe fn delete(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn makeTextWritingDirectionLeftToRight(&self, sender: Option<&AnyObject>)
unsafe fn makeTextWritingDirectionLeftToRight(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn makeTextWritingDirectionRightToLeft(&self, sender: Option<&AnyObject>)
unsafe fn makeTextWritingDirectionRightToLeft(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn toggleBoldface(&self, sender: Option<&AnyObject>)
unsafe fn toggleBoldface(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn toggleItalics(&self, sender: Option<&AnyObject>)
unsafe fn toggleItalics(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn toggleUnderline(&self, sender: Option<&AnyObject>)
unsafe fn toggleUnderline(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn increaseSize(&self, sender: Option<&AnyObject>)
unsafe fn increaseSize(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn decreaseSize(&self, sender: Option<&AnyObject>)
unsafe fn decreaseSize(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn find(&self, sender: Option<&AnyObject>)
unsafe fn find(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn findAndReplace(&self, sender: Option<&AnyObject>)
unsafe fn findAndReplace(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn findNext(&self, sender: Option<&AnyObject>)
unsafe fn findNext(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn findPrevious(&self, sender: Option<&AnyObject>)
unsafe fn findPrevious(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn useSelectionForFind(&self, sender: Option<&AnyObject>)
unsafe fn useSelectionForFind(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn updateTextAttributesWithConversionHandler(
&self,
conversion_handler: UITextAttributesConversionHandler,
)
unsafe fn updateTextAttributesWithConversionHandler( &self, conversion_handler: UITextAttributesConversionHandler, )
UIResponder
and block2
only.Source§unsafe fn print(&self, sender: Option<&AnyObject>)
unsafe fn print(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn rename(&self, sender: Option<&AnyObject>)
unsafe fn rename(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn duplicate(&self, sender: Option<&AnyObject>)
unsafe fn duplicate(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§unsafe fn move(&self, sender: Option<&AnyObject>)
unsafe fn move(&self, sender: Option<&AnyObject>)
UIResponder
only.Source§impl UITextInput for UISearchTextField
impl UITextInput for UISearchTextField
Source§unsafe fn textInRange(&self, range: &UITextRange) -> Option<Retained<NSString>>
unsafe fn textInRange(&self, range: &UITextRange) -> Option<Retained<NSString>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn replaceRange_withText(&self, range: &UITextRange, text: &NSString)
unsafe fn replaceRange_withText(&self, range: &UITextRange, text: &NSString)
UITextInput
and UITextInputTraits
only.Source§unsafe fn selectedTextRange(&self) -> Option<Retained<UITextRange>>
unsafe fn selectedTextRange(&self) -> Option<Retained<UITextRange>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn setSelectedTextRange(&self, selected_text_range: Option<&UITextRange>)
unsafe fn setSelectedTextRange(&self, selected_text_range: Option<&UITextRange>)
UITextInput
and UITextInputTraits
only.selectedTextRange
.Source§unsafe fn markedTextRange(&self) -> Option<Retained<UITextRange>>
unsafe fn markedTextRange(&self) -> Option<Retained<UITextRange>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn markedTextStyle(
&self,
) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
unsafe fn markedTextStyle( &self, ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn setMarkedTextStyle(
&self,
marked_text_style: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
)
unsafe fn setMarkedTextStyle( &self, marked_text_style: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>, )
UITextInput
and UITextInputTraits
only.markedTextStyle
.Source§unsafe fn setMarkedText_selectedRange(
&self,
marked_text: Option<&NSString>,
selected_range: NSRange,
)
unsafe fn setMarkedText_selectedRange( &self, marked_text: Option<&NSString>, selected_range: NSRange, )
UITextInput
and UITextInputTraits
only.Source§unsafe fn unmarkText(&self)
unsafe fn unmarkText(&self)
UITextInput
and UITextInputTraits
only.Source§unsafe fn beginningOfDocument(&self) -> Retained<UITextPosition>
unsafe fn beginningOfDocument(&self) -> Retained<UITextPosition>
UITextInput
and UITextInputTraits
only.Source§unsafe fn endOfDocument(&self) -> Retained<UITextPosition>
unsafe fn endOfDocument(&self) -> Retained<UITextPosition>
UITextInput
and UITextInputTraits
only.Source§unsafe fn textRangeFromPosition_toPosition(
&self,
from_position: &UITextPosition,
to_position: &UITextPosition,
) -> Option<Retained<UITextRange>>
unsafe fn textRangeFromPosition_toPosition( &self, from_position: &UITextPosition, to_position: &UITextPosition, ) -> Option<Retained<UITextRange>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn positionFromPosition_offset(
&self,
position: &UITextPosition,
offset: NSInteger,
) -> Option<Retained<UITextPosition>>
unsafe fn positionFromPosition_offset( &self, position: &UITextPosition, offset: NSInteger, ) -> Option<Retained<UITextPosition>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn positionFromPosition_inDirection_offset(
&self,
position: &UITextPosition,
direction: UITextLayoutDirection,
offset: NSInteger,
) -> Option<Retained<UITextPosition>>
unsafe fn positionFromPosition_inDirection_offset( &self, position: &UITextPosition, direction: UITextLayoutDirection, offset: NSInteger, ) -> Option<Retained<UITextPosition>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn comparePosition_toPosition(
&self,
position: &UITextPosition,
other: &UITextPosition,
) -> NSComparisonResult
unsafe fn comparePosition_toPosition( &self, position: &UITextPosition, other: &UITextPosition, ) -> NSComparisonResult
UITextInput
and UITextInputTraits
only.Source§unsafe fn offsetFromPosition_toPosition(
&self,
from: &UITextPosition,
to_position: &UITextPosition,
) -> NSInteger
unsafe fn offsetFromPosition_toPosition( &self, from: &UITextPosition, to_position: &UITextPosition, ) -> NSInteger
UITextInput
and UITextInputTraits
only.Source§unsafe fn inputDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn UITextInputDelegate>>>
unsafe fn inputDelegate( &self, ) -> Option<Retained<ProtocolObject<dyn UITextInputDelegate>>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn setInputDelegate(
&self,
input_delegate: Option<&ProtocolObject<dyn UITextInputDelegate>>,
)
unsafe fn setInputDelegate( &self, input_delegate: Option<&ProtocolObject<dyn UITextInputDelegate>>, )
UITextInput
and UITextInputTraits
only.inputDelegate
.Source§unsafe fn tokenizer(&self) -> Retained<ProtocolObject<dyn UITextInputTokenizer>>
unsafe fn tokenizer(&self) -> Retained<ProtocolObject<dyn UITextInputTokenizer>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn positionWithinRange_farthestInDirection(
&self,
range: &UITextRange,
direction: UITextLayoutDirection,
) -> Option<Retained<UITextPosition>>
unsafe fn positionWithinRange_farthestInDirection( &self, range: &UITextRange, direction: UITextLayoutDirection, ) -> Option<Retained<UITextPosition>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn characterRangeByExtendingPosition_inDirection(
&self,
position: &UITextPosition,
direction: UITextLayoutDirection,
) -> Option<Retained<UITextRange>>
unsafe fn characterRangeByExtendingPosition_inDirection( &self, position: &UITextPosition, direction: UITextLayoutDirection, ) -> Option<Retained<UITextRange>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn baseWritingDirectionForPosition_inDirection(
&self,
position: &UITextPosition,
direction: UITextStorageDirection,
) -> NSWritingDirection
unsafe fn baseWritingDirectionForPosition_inDirection( &self, position: &UITextPosition, direction: UITextStorageDirection, ) -> NSWritingDirection
UITextInput
and UITextInputTraits
and NSText
only.Source§unsafe fn setBaseWritingDirection_forRange(
&self,
writing_direction: NSWritingDirection,
range: &UITextRange,
)
unsafe fn setBaseWritingDirection_forRange( &self, writing_direction: NSWritingDirection, range: &UITextRange, )
UITextInput
and UITextInputTraits
and NSText
only.Source§unsafe fn firstRectForRange(&self, range: &UITextRange) -> CGRect
unsafe fn firstRectForRange(&self, range: &UITextRange) -> CGRect
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.Source§unsafe fn caretRectForPosition(&self, position: &UITextPosition) -> CGRect
unsafe fn caretRectForPosition(&self, position: &UITextPosition) -> CGRect
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.Source§unsafe fn selectionRectsForRange(
&self,
range: &UITextRange,
) -> Retained<NSArray<UITextSelectionRect>>
unsafe fn selectionRectsForRange( &self, range: &UITextRange, ) -> Retained<NSArray<UITextSelectionRect>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn closestPositionToPoint(
&self,
point: CGPoint,
) -> Option<Retained<UITextPosition>>
unsafe fn closestPositionToPoint( &self, point: CGPoint, ) -> Option<Retained<UITextPosition>>
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.Source§unsafe fn closestPositionToPoint_withinRange(
&self,
point: CGPoint,
range: &UITextRange,
) -> Option<Retained<UITextPosition>>
unsafe fn closestPositionToPoint_withinRange( &self, point: CGPoint, range: &UITextRange, ) -> Option<Retained<UITextPosition>>
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.Source§unsafe fn characterRangeAtPoint(
&self,
point: CGPoint,
) -> Option<Retained<UITextRange>>
unsafe fn characterRangeAtPoint( &self, point: CGPoint, ) -> Option<Retained<UITextRange>>
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.Source§unsafe fn shouldChangeTextInRange_replacementText(
&self,
range: &UITextRange,
text: &NSString,
) -> bool
unsafe fn shouldChangeTextInRange_replacementText( &self, range: &UITextRange, text: &NSString, ) -> bool
UITextInput
and UITextInputTraits
only.Source§unsafe fn textStylingAtPosition_inDirection(
&self,
position: &UITextPosition,
direction: UITextStorageDirection,
) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
unsafe fn textStylingAtPosition_inDirection( &self, position: &UITextPosition, direction: UITextStorageDirection, ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn positionWithinRange_atCharacterOffset(
&self,
range: &UITextRange,
offset: NSInteger,
) -> Option<Retained<UITextPosition>>
unsafe fn positionWithinRange_atCharacterOffset( &self, range: &UITextRange, offset: NSInteger, ) -> Option<Retained<UITextPosition>>
UITextInput
and UITextInputTraits
only.Source§unsafe fn characterOffsetOfPosition_withinRange(
&self,
position: &UITextPosition,
range: &UITextRange,
) -> NSInteger
unsafe fn characterOffsetOfPosition_withinRange( &self, position: &UITextPosition, range: &UITextRange, ) -> NSInteger
UITextInput
and UITextInputTraits
only.Source§unsafe fn textInputView(&self) -> Retained<UIView>
unsafe fn textInputView(&self) -> Retained<UIView>
UITextInput
and UITextInputTraits
and UIResponder
and UIView
only.Source§unsafe fn selectionAffinity(&self) -> UITextStorageDirection
unsafe fn selectionAffinity(&self) -> UITextStorageDirection
UITextInput
and UITextInputTraits
only.Source§unsafe fn setSelectionAffinity(
&self,
selection_affinity: UITextStorageDirection,
)
unsafe fn setSelectionAffinity( &self, selection_affinity: UITextStorageDirection, )
UITextInput
and UITextInputTraits
only.selectionAffinity
.Source§unsafe fn insertDictationResult(
&self,
dictation_result: &NSArray<UIDictationPhrase>,
)
unsafe fn insertDictationResult( &self, dictation_result: &NSArray<UIDictationPhrase>, )
UITextInput
and UITextInputTraits
only.Source§unsafe fn dictationRecordingDidEnd(&self)
unsafe fn dictationRecordingDidEnd(&self)
UITextInput
and UITextInputTraits
only.Source§unsafe fn dictationRecognitionFailed(&self)
unsafe fn dictationRecognitionFailed(&self)
UITextInput
and UITextInputTraits
only.Source§unsafe fn insertDictationResultPlaceholder(&self) -> Retained<AnyObject>
unsafe fn insertDictationResultPlaceholder(&self) -> Retained<AnyObject>
UITextInput
and UITextInputTraits
only.Source§unsafe fn frameForDictationResultPlaceholder(
&self,
placeholder: &AnyObject,
) -> CGRect
unsafe fn frameForDictationResultPlaceholder( &self, placeholder: &AnyObject, ) -> CGRect
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.Source§unsafe fn removeDictationResultPlaceholder_willInsertResult(
&self,
placeholder: &AnyObject,
will_insert_result: bool,
)
unsafe fn removeDictationResultPlaceholder_willInsertResult( &self, placeholder: &AnyObject, will_insert_result: bool, )
UITextInput
and UITextInputTraits
only.Source§unsafe fn insertText_alternatives_style(
&self,
text: &NSString,
alternatives: &NSArray<NSString>,
style: UITextAlternativeStyle,
)
unsafe fn insertText_alternatives_style( &self, text: &NSString, alternatives: &NSArray<NSString>, style: UITextAlternativeStyle, )
UITextInput
and UITextInputTraits
only.Source§unsafe fn setAttributedMarkedText_selectedRange(
&self,
marked_text: Option<&NSAttributedString>,
selected_range: NSRange,
)
unsafe fn setAttributedMarkedText_selectedRange( &self, marked_text: Option<&NSAttributedString>, selected_range: NSRange, )
UITextInput
and UITextInputTraits
only.Source§unsafe fn insertTextPlaceholderWithSize(
&self,
size: CGSize,
) -> Retained<UITextPlaceholder>
unsafe fn insertTextPlaceholderWithSize( &self, size: CGSize, ) -> Retained<UITextPlaceholder>
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.Source§unsafe fn removeTextPlaceholder(&self, text_placeholder: &UITextPlaceholder)
unsafe fn removeTextPlaceholder(&self, text_placeholder: &UITextPlaceholder)
UITextInput
and UITextInputTraits
only.Source§unsafe fn beginFloatingCursorAtPoint(&self, point: CGPoint)
unsafe fn beginFloatingCursorAtPoint(&self, point: CGPoint)
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.Source§unsafe fn updateFloatingCursorAtPoint(&self, point: CGPoint)
unsafe fn updateFloatingCursorAtPoint(&self, point: CGPoint)
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.Source§unsafe fn endFloatingCursor(&self)
unsafe fn endFloatingCursor(&self)
UITextInput
and UITextInputTraits
only.Source§unsafe fn caretTransformForPosition(
&self,
position: &UITextPosition,
) -> CGAffineTransform
unsafe fn caretTransformForPosition( &self, position: &UITextPosition, ) -> CGAffineTransform
UITextInput
and UITextInputTraits
and objc2-core-foundation
only.-caretRectForPosition:
, optionally provide a transform for the caret at position
. As with all geometry information in this protocol,
transforms are assumed to be relative to the textInputView
coordinate space. If unimplemented, the identity transform is assumed.Source§unsafe fn editMenuForTextRange_suggestedActions(
&self,
text_range: &UITextRange,
suggested_actions: &NSArray<UIMenuElement>,
) -> Option<Retained<UIMenu>>
unsafe fn editMenuForTextRange_suggestedActions( &self, text_range: &UITextRange, suggested_actions: &NSArray<UIMenuElement>, ) -> Option<Retained<UIMenu>>
UITextInput
and UITextInputTraits
and UIMenu
and UIMenuElement
only.Source§unsafe fn willPresentEditMenuWithAnimator(
&self,
animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
)
unsafe fn willPresentEditMenuWithAnimator( &self, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>, )
UITextInput
and UITextInputTraits
and UIEditMenuInteraction
only.Source§unsafe fn willDismissEditMenuWithAnimator(
&self,
animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
)
unsafe fn willDismissEditMenuWithAnimator( &self, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>, )
UITextInput
and UITextInputTraits
and UIEditMenuInteraction
only.Source§unsafe fn supportsAdaptiveImageGlyph(&self) -> bool
unsafe fn supportsAdaptiveImageGlyph(&self) -> bool
UITextInput
and UITextInputTraits
only.Source§unsafe fn setSupportsAdaptiveImageGlyph(
&self,
supports_adaptive_image_glyph: bool,
)
unsafe fn setSupportsAdaptiveImageGlyph( &self, supports_adaptive_image_glyph: bool, )
UITextInput
and UITextInputTraits
only.supportsAdaptiveImageGlyph
.Source§unsafe fn insertAdaptiveImageGlyph_replacementRange(
&self,
adaptive_image_glyph: &NSAdaptiveImageGlyph,
replacement_range: &UITextRange,
)
unsafe fn insertAdaptiveImageGlyph_replacementRange( &self, adaptive_image_glyph: &NSAdaptiveImageGlyph, replacement_range: &UITextRange, )
UITextInput
and UITextInputTraits
and NSAdaptiveImageGlyph
only.Source§unsafe fn isEditable(&self) -> bool
unsafe fn isEditable(&self) -> bool
UITextInput
and UITextInputTraits
only.Source§unsafe fn insertAttributedText(&self, string: &NSAttributedString)
unsafe fn insertAttributedText(&self, string: &NSAttributedString)
UITextInput
and UITextInputTraits
only.Source§unsafe fn attributedTextInRange(
&self,
range: &UITextRange,
) -> Retained<NSAttributedString>
unsafe fn attributedTextInRange( &self, range: &UITextRange, ) -> Retained<NSAttributedString>
UITextInput
and UITextInputTraits
only.Source§unsafe fn replaceRange_withAttributedText(
&self,
range: &UITextRange,
attributed_text: &NSAttributedString,
)
unsafe fn replaceRange_withAttributedText( &self, range: &UITextRange, attributed_text: &NSAttributedString, )
UITextInput
and UITextInputTraits
only.Source§unsafe fn willPresentWritingTools(&self)
unsafe fn willPresentWritingTools(&self)
UITextInput
and UITextInputTraits
only.Source§unsafe fn didDismissWritingTools(&self)
unsafe fn didDismissWritingTools(&self)
UITextInput
and UITextInputTraits
only.Source§unsafe fn insertInputSuggestion(&self, input_suggestion: &UIInputSuggestion)
unsafe fn insertInputSuggestion(&self, input_suggestion: &UIInputSuggestion)
UITextInput
and UITextInputTraits
and UIInputSuggestion
only.Source§impl UITextInputTraits for UISearchTextField
impl UITextInputTraits for UISearchTextField
Source§unsafe fn autocapitalizationType(&self) -> UITextAutocapitalizationType
unsafe fn autocapitalizationType(&self) -> UITextAutocapitalizationType
UITextInputTraits
only.Source§unsafe fn setAutocapitalizationType(
&self,
autocapitalization_type: UITextAutocapitalizationType,
)
unsafe fn setAutocapitalizationType( &self, autocapitalization_type: UITextAutocapitalizationType, )
UITextInputTraits
only.autocapitalizationType
.Source§unsafe fn autocorrectionType(&self) -> UITextAutocorrectionType
unsafe fn autocorrectionType(&self) -> UITextAutocorrectionType
UITextInputTraits
only.Source§unsafe fn setAutocorrectionType(
&self,
autocorrection_type: UITextAutocorrectionType,
)
unsafe fn setAutocorrectionType( &self, autocorrection_type: UITextAutocorrectionType, )
UITextInputTraits
only.autocorrectionType
.Source§unsafe fn spellCheckingType(&self) -> UITextSpellCheckingType
unsafe fn spellCheckingType(&self) -> UITextSpellCheckingType
UITextInputTraits
only.Source§unsafe fn setSpellCheckingType(
&self,
spell_checking_type: UITextSpellCheckingType,
)
unsafe fn setSpellCheckingType( &self, spell_checking_type: UITextSpellCheckingType, )
UITextInputTraits
only.spellCheckingType
.Source§unsafe fn smartQuotesType(&self) -> UITextSmartQuotesType
unsafe fn smartQuotesType(&self) -> UITextSmartQuotesType
UITextInputTraits
only.Source§unsafe fn setSmartQuotesType(&self, smart_quotes_type: UITextSmartQuotesType)
unsafe fn setSmartQuotesType(&self, smart_quotes_type: UITextSmartQuotesType)
UITextInputTraits
only.smartQuotesType
.Source§unsafe fn smartDashesType(&self) -> UITextSmartDashesType
unsafe fn smartDashesType(&self) -> UITextSmartDashesType
UITextInputTraits
only.Source§unsafe fn setSmartDashesType(&self, smart_dashes_type: UITextSmartDashesType)
unsafe fn setSmartDashesType(&self, smart_dashes_type: UITextSmartDashesType)
UITextInputTraits
only.smartDashesType
.Source§unsafe fn smartInsertDeleteType(&self) -> UITextSmartInsertDeleteType
unsafe fn smartInsertDeleteType(&self) -> UITextSmartInsertDeleteType
UITextInputTraits
only.Source§unsafe fn setSmartInsertDeleteType(
&self,
smart_insert_delete_type: UITextSmartInsertDeleteType,
)
unsafe fn setSmartInsertDeleteType( &self, smart_insert_delete_type: UITextSmartInsertDeleteType, )
UITextInputTraits
only.smartInsertDeleteType
.Source§unsafe fn inlinePredictionType(&self) -> UITextInlinePredictionType
unsafe fn inlinePredictionType(&self) -> UITextInlinePredictionType
UITextInputTraits
only.Source§unsafe fn setInlinePredictionType(
&self,
inline_prediction_type: UITextInlinePredictionType,
)
unsafe fn setInlinePredictionType( &self, inline_prediction_type: UITextInlinePredictionType, )
UITextInputTraits
only.inlinePredictionType
.Source§unsafe fn mathExpressionCompletionType(
&self,
) -> UITextMathExpressionCompletionType
unsafe fn mathExpressionCompletionType( &self, ) -> UITextMathExpressionCompletionType
UITextInputTraits
only.Source§unsafe fn setMathExpressionCompletionType(
&self,
math_expression_completion_type: UITextMathExpressionCompletionType,
)
unsafe fn setMathExpressionCompletionType( &self, math_expression_completion_type: UITextMathExpressionCompletionType, )
UITextInputTraits
only.mathExpressionCompletionType
.Source§unsafe fn keyboardType(&self) -> UIKeyboardType
unsafe fn keyboardType(&self) -> UIKeyboardType
UITextInputTraits
only.Source§unsafe fn setKeyboardType(&self, keyboard_type: UIKeyboardType)
unsafe fn setKeyboardType(&self, keyboard_type: UIKeyboardType)
UITextInputTraits
only.keyboardType
.Source§unsafe fn keyboardAppearance(&self) -> UIKeyboardAppearance
unsafe fn keyboardAppearance(&self) -> UIKeyboardAppearance
UITextInputTraits
only.Source§unsafe fn setKeyboardAppearance(
&self,
keyboard_appearance: UIKeyboardAppearance,
)
unsafe fn setKeyboardAppearance( &self, keyboard_appearance: UIKeyboardAppearance, )
UITextInputTraits
only.keyboardAppearance
.Source§unsafe fn returnKeyType(&self) -> UIReturnKeyType
unsafe fn returnKeyType(&self) -> UIReturnKeyType
UITextInputTraits
only.Source§unsafe fn setReturnKeyType(&self, return_key_type: UIReturnKeyType)
unsafe fn setReturnKeyType(&self, return_key_type: UIReturnKeyType)
UITextInputTraits
only.returnKeyType
.Source§unsafe fn enablesReturnKeyAutomatically(&self) -> bool
unsafe fn enablesReturnKeyAutomatically(&self) -> bool
UITextInputTraits
only.Source§unsafe fn setEnablesReturnKeyAutomatically(
&self,
enables_return_key_automatically: bool,
)
unsafe fn setEnablesReturnKeyAutomatically( &self, enables_return_key_automatically: bool, )
UITextInputTraits
only.enablesReturnKeyAutomatically
.Source§unsafe fn isSecureTextEntry(&self) -> bool
unsafe fn isSecureTextEntry(&self) -> bool
UITextInputTraits
only.Source§unsafe fn setSecureTextEntry(&self, secure_text_entry: bool)
unsafe fn setSecureTextEntry(&self, secure_text_entry: bool)
UITextInputTraits
only.isSecureTextEntry
.Source§unsafe fn textContentType(&self) -> Retained<UITextContentType>
unsafe fn textContentType(&self) -> Retained<UITextContentType>
UITextInputTraits
only.Source§unsafe fn setTextContentType(
&self,
text_content_type: Option<&UITextContentType>,
)
unsafe fn setTextContentType( &self, text_content_type: Option<&UITextContentType>, )
UITextInputTraits
only.textContentType
.Source§unsafe fn passwordRules(&self) -> Option<Retained<UITextInputPasswordRules>>
unsafe fn passwordRules(&self) -> Option<Retained<UITextInputPasswordRules>>
UITextInputTraits
only.Source§unsafe fn setPasswordRules(
&self,
password_rules: Option<&UITextInputPasswordRules>,
)
unsafe fn setPasswordRules( &self, password_rules: Option<&UITextInputPasswordRules>, )
UITextInputTraits
only.passwordRules
.Source§unsafe fn writingToolsBehavior(&self) -> UIWritingToolsBehavior
unsafe fn writingToolsBehavior(&self) -> UIWritingToolsBehavior
UITextInputTraits
only.Source§unsafe fn setWritingToolsBehavior(
&self,
writing_tools_behavior: UIWritingToolsBehavior,
)
unsafe fn setWritingToolsBehavior( &self, writing_tools_behavior: UIWritingToolsBehavior, )
UITextInputTraits
only.writingToolsBehavior
.Source§unsafe fn allowedWritingToolsResultOptions(&self) -> UIWritingToolsResultOptions
unsafe fn allowedWritingToolsResultOptions(&self) -> UIWritingToolsResultOptions
UITextInputTraits
only.Source§unsafe fn setAllowedWritingToolsResultOptions(
&self,
allowed_writing_tools_result_options: UIWritingToolsResultOptions,
)
unsafe fn setAllowedWritingToolsResultOptions( &self, allowed_writing_tools_result_options: UIWritingToolsResultOptions, )
UITextInputTraits
only.allowedWritingToolsResultOptions
.Source§unsafe fn conversationContext(&self) -> Option<Retained<UIConversationContext>>
unsafe fn conversationContext(&self) -> Option<Retained<UIConversationContext>>
UITextInputTraits
and UIConversationContext
only.Source§unsafe fn setConversationContext(
&self,
conversation_context: Option<&UIConversationContext>,
)
unsafe fn setConversationContext( &self, conversation_context: Option<&UIConversationContext>, )
UITextInputTraits
and UIConversationContext
only.conversationContext
.Source§impl UITraitEnvironment for UISearchTextField
impl UITraitEnvironment for UISearchTextField
Source§fn traitCollection(&self) -> Retained<UITraitCollection>
fn traitCollection(&self) -> Retained<UITraitCollection>
UITraitCollection
only.Source§unsafe fn traitCollectionDidChange(
&self,
previous_trait_collection: Option<&UITraitCollection>,
)
unsafe fn traitCollectionDidChange( &self, previous_trait_collection: Option<&UITraitCollection>, )
UITraitCollection
only.impl DowncastTarget for UISearchTextField
impl Eq for UISearchTextField
impl UIAppearanceContainer for UISearchTextField
Auto Trait Implementations§
impl !Freeze for UISearchTextField
impl !RefUnwindSafe for UISearchTextField
impl !Send for UISearchTextField
impl !Sync for UISearchTextField
impl !Unpin for UISearchTextField
impl !UnwindSafe for UISearchTextField
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<'a, T> MainThreadOnly for T
impl<'a, T> MainThreadOnly for T
Source§fn mtm(&self) -> MainThreadMarker
fn mtm(&self) -> MainThreadMarker
MainThreadMarker
from the main-thread-only object. Read more