#[repr(transparent)]pub struct NSWritingToolsCoordinatorTextReplacementReason(pub NSInteger);
NSWritingToolsCoordinator
only.Expand description
Options that indicate whether Writing Tools is animating changes to your view’s text.
During an operation, Writing Tools delivers replacement text to the
delegate of the active NSWritingToolsCoordinator
object. Depending
on the configured experience for your view, it delivers these changes
as either interactive or noninteractive replacements. For interactive
replacements, Writing Tools animates the change automatically and provides
you with the information you need to perform any related animations.
See also Apple’s documentation
Tuple Fields§
§0: NSInteger
Implementations§
Source§impl NSWritingToolsCoordinatorTextReplacementReason
impl NSWritingToolsCoordinatorTextReplacementReason
Sourcepub const Interactive: Self
pub const Interactive: Self
An option to animate the replacement of text in your view.
When Writing Tools requests an interactive change in your delegate’s
NSWritingToolsCoordinator/writingToolsCoordinator(_:replaceRange:inContext:proposedText:reason:animationParameters:completion:)
method, it passes a valid set of animation parameters to that method.
Update your view’s text storage and use the provided NSWritingToolsCoordinator/AnimationParameters
type to create any view-specific animations you need to support the
animated replacement of the text.
Sourcepub const Noninteractive: Self
pub const Noninteractive: Self
An option to replace the text in your view without animating the change.
When Writing Tools requests a noninteractive change in your delegate’s
NSWritingToolsCoordinator/writingToolsCoordinator(_:replaceRange:inContext:proposedText:reason:animationParameters:completion:)
method, update your view’s text storage without animating the change.
Trait Implementations§
Source§impl Clone for NSWritingToolsCoordinatorTextReplacementReason
impl Clone for NSWritingToolsCoordinatorTextReplacementReason
Source§fn clone(&self) -> NSWritingToolsCoordinatorTextReplacementReason
fn clone(&self) -> NSWritingToolsCoordinatorTextReplacementReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Ord for NSWritingToolsCoordinatorTextReplacementReason
impl Ord for NSWritingToolsCoordinatorTextReplacementReason
Source§fn cmp(
&self,
other: &NSWritingToolsCoordinatorTextReplacementReason,
) -> Ordering
fn cmp( &self, other: &NSWritingToolsCoordinatorTextReplacementReason, ) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NSWritingToolsCoordinatorTextReplacementReason
impl PartialEq for NSWritingToolsCoordinatorTextReplacementReason
Source§fn eq(&self, other: &NSWritingToolsCoordinatorTextReplacementReason) -> bool
fn eq(&self, other: &NSWritingToolsCoordinatorTextReplacementReason) -> bool
self
and other
values to be equal, and is used by ==
.