pub unsafe trait UISearchBarDelegate: UIBarPositioningDelegate + MainThreadOnly {
// Provided methods
fn searchBarShouldBeginEditing(&self, search_bar: &UISearchBar) -> bool
where Self: Sized + Message { ... }
fn searchBarTextDidBeginEditing(&self, search_bar: &UISearchBar)
where Self: Sized + Message { ... }
fn searchBarShouldEndEditing(&self, search_bar: &UISearchBar) -> bool
where Self: Sized + Message { ... }
fn searchBarTextDidEndEditing(&self, search_bar: &UISearchBar)
where Self: Sized + Message { ... }
fn searchBar_textDidChange(
&self,
search_bar: &UISearchBar,
search_text: &NSString,
)
where Self: Sized + Message { ... }
fn searchBar_shouldChangeTextInRange_replacementText(
&self,
search_bar: &UISearchBar,
range: NSRange,
text: &NSString,
) -> bool
where Self: Sized + Message { ... }
fn searchBar_shouldChangeTextInRanges_replacementText(
&self,
search_bar: &UISearchBar,
ranges: &NSArray<NSValue>,
replacement_text: &NSString,
) -> bool
where Self: Sized + Message { ... }
fn searchBarSearchButtonClicked(&self, search_bar: &UISearchBar)
where Self: Sized + Message { ... }
fn searchBarBookmarkButtonClicked(&self, search_bar: &UISearchBar)
where Self: Sized + Message { ... }
fn searchBarCancelButtonClicked(&self, search_bar: &UISearchBar)
where Self: Sized + Message { ... }
fn searchBarResultsListButtonClicked(&self, search_bar: &UISearchBar)
where Self: Sized + Message { ... }
fn searchBar_selectedScopeButtonIndexDidChange(
&self,
search_bar: &UISearchBar,
selected_scope: NSInteger,
)
where Self: Sized + Message { ... }
}UIBarCommon and UISearchBar only.Expand description
Provided Methods§
fn searchBarShouldBeginEditing(&self, search_bar: &UISearchBar) -> bool
UIResponder and UIView only.fn searchBarTextDidBeginEditing(&self, search_bar: &UISearchBar)
UIResponder and UIView only.fn searchBarShouldEndEditing(&self, search_bar: &UISearchBar) -> bool
UIResponder and UIView only.fn searchBarTextDidEndEditing(&self, search_bar: &UISearchBar)
UIResponder and UIView only.fn searchBar_textDidChange( &self, search_bar: &UISearchBar, search_text: &NSString, )
UIResponder and UIView only.fn searchBar_shouldChangeTextInRange_replacementText( &self, search_bar: &UISearchBar, range: NSRange, text: &NSString, ) -> bool
UIResponder and UIView only.Sourcefn searchBar_shouldChangeTextInRanges_replacementText(
&self,
search_bar: &UISearchBar,
ranges: &NSArray<NSValue>,
replacement_text: &NSString,
) -> bool
Available on crate features UIResponder and UIView only.
fn searchBar_shouldChangeTextInRanges_replacementText( &self, search_bar: &UISearchBar, ranges: &NSArray<NSValue>, replacement_text: &NSString, ) -> bool
UIResponder and UIView only.Asks the delegate if the text at the specified ranges should be replaced with text.
If this method returns YES then the search bar will, at its own discretion, choose any one of the specified ranges of text and replace it with the specified replacementText before deleting the text at the other ranges. If the delegate does not implement this method then the searchBar:shouldChangeTextInRange:replacementText: method will be called and passed the union range instead. If the delegate also does not implement that method then YES is assumed.
Parameter searchBar: The search bar asking the delegate
Parameter ranges: The ranges of the text that should be deleted before replacing
Parameter replacementText: The replacement text
Returns: Returns true if the text at the ranges should be replaced.
fn searchBarSearchButtonClicked(&self, search_bar: &UISearchBar)
UIResponder and UIView only.fn searchBarBookmarkButtonClicked(&self, search_bar: &UISearchBar)
UIResponder and UIView only.fn searchBarCancelButtonClicked(&self, search_bar: &UISearchBar)
UIResponder and UIView only.fn searchBarResultsListButtonClicked(&self, search_bar: &UISearchBar)
UIResponder and UIView only.fn searchBar_selectedScopeButtonIndexDidChange( &self, search_bar: &UISearchBar, selected_scope: NSInteger, )
UIResponder and UIView only.