pub unsafe trait UITextSearchAggregator: NSObjectProtocol + MainThreadOnly {
// Provided methods
unsafe fn allFoundRanges(&self) -> Retained<NSOrderedSet<UITextRange>>
where Self: Sized + Message { ... }
unsafe fn foundRange_forSearchString_inDocument(
&self,
range: &UITextRange,
string: &NSString,
document: Option<&UITextSearchDocumentIdentifier>,
)
where Self: Sized + Message { ... }
unsafe fn invalidateFoundRange_inDocument(
&self,
range: &UITextRange,
document: Option<&UITextSearchDocumentIdentifier>,
)
where Self: Sized + Message { ... }
unsafe fn invalidate(&self)
where Self: Sized + Message { ... }
unsafe fn finishedSearching(&self)
where Self: Sized + Message { ... }
}
UITextSearching
only.Expand description
Provided Methods§
Sourceunsafe fn allFoundRanges(&self) -> Retained<NSOrderedSet<UITextRange>>
Available on crate feature UITextInput
only.
unsafe fn allFoundRanges(&self) -> Retained<NSOrderedSet<UITextRange>>
UITextInput
only.Returns all currently reported found ranges via
foundRange:forSearchString:.
Sourceunsafe fn foundRange_forSearchString_inDocument(
&self,
range: &UITextRange,
string: &NSString,
document: Option<&UITextSearchDocumentIdentifier>,
)
Available on crate feature UITextInput
only.
unsafe fn foundRange_forSearchString_inDocument( &self, range: &UITextRange, string: &NSString, document: Option<&UITextSearchDocumentIdentifier>, )
UITextInput
only.Call this method when a range of text is found in your document.
Parameter range
: The range of text that was found.
Parameter string
: The query string that was used to locate this range of text.
Parameter document
: (Optional) A developer-defined document identifier, later provided when this range
needs to be styled.
Sourceunsafe fn invalidateFoundRange_inDocument(
&self,
range: &UITextRange,
document: Option<&UITextSearchDocumentIdentifier>,
)
Available on crate feature UITextInput
only.
unsafe fn invalidateFoundRange_inDocument( &self, range: &UITextRange, document: Option<&UITextSearchDocumentIdentifier>, )
UITextInput
only.Call this method when a found
range
is no longer in
document
. This will cause the system find
panel to update it’s current state, and if the range provided is the currently highlighted range, will advance
to the next found result.
Parameter range
: The range that is now invalid.
Parameter document
: (Optional) If multiple documents are used, the document identifier for the range provided.
Sourceunsafe fn invalidate(&self)
unsafe fn invalidate(&self)
Call this method to invalidate all currently shown ranges. This will cause the system find panel to update
it’s current state, and may trigger a new search using performTextSearchWithQueryString:
immediately after.
Sourceunsafe fn finishedSearching(&self)
unsafe fn finishedSearching(&self)
Call this method after all documents have been searched.