Skip to content

Instantly share code, notes, and snippets.

View ruslangazizov's full-sized avatar
📱
👨‍💻🏐🏀

Ruslan Gazizov ruslangazizov

📱
👨‍💻🏐🏀
  • Kazan, Russia
  • 09:30 (UTC +03:00)
View GitHub Profile
@romyilano
romyilano / appleSearchBarSample.swift
Last active June 15, 2022 17:14
Various search bar implementations. Including an RxSwift / reactive swift version too
//https://developer.apple.com/library/content/samplecode/TableSearch_UISearchController/Introduction/Intro.html
// MARK: - UISearchResultsUpdating
func updateSearchResults(for searchController: UISearchController) {
// Update the filtered array based on the search text.
let searchResults = products
// Strip out all the leading and trailing spaces.
let whitespaceCharacterSet = CharacterSet.whitespaces