UITextSearchAggregator

Trait UITextSearchAggregator 

Source
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 { ... }
}
Available on crate feature UITextSearching only.
Expand description

Provided Methods§

Source

unsafe fn allFoundRanges(&self) -> Retained<NSOrderedSet<UITextRange>>
where Self: Sized + Message,

Available on crate feature UITextInput only.

Returns all currently reported found ranges via foundRange:forSearchString:.

Source

unsafe fn foundRange_forSearchString_inDocument( &self, range: &UITextRange, string: &NSString, document: Option<&UITextSearchDocumentIdentifier>, )
where Self: Sized + Message,

Available on crate feature 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.

Source

unsafe fn invalidateFoundRange_inDocument( &self, range: &UITextRange, document: Option<&UITextSearchDocumentIdentifier>, )
where Self: Sized + Message,

Available on crate feature UITextInput only.

Call this method when a found rangeis 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.

Source

unsafe fn invalidate(&self)
where Self: Sized + Message,

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.

Source

unsafe fn finishedSearching(&self)
where Self: Sized + Message,

Call this method after all documents have been searched.

Trait Implementations§

Source§

impl ProtocolType for dyn UITextSearchAggregator

Source§

const NAME: &'static str = "UITextSearchAggregator"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn UITextSearchAggregator

Implementations on Foreign Types§

Source§

impl<T> UITextSearchAggregator for ProtocolObject<T>

Implementors§