Filtering data based on search bar text using Combine | SwiftUI Crypto App #11
Автор: Swiftful Thinking
Загружено: 2021-06-04
Просмотров: 15604
Описание:
Based on the last video, you probably guessed what is one would be about! Here we will create a subscriber to listen to the search bar (TextField text) and filter our data every time the user types something. We will then add a Debounce to the subscriber to make our app's UI run as efficient as possible (this is one of the most convenient functions included with Combine).
It's important to note that all of the logic for filtering is being done within the ViewModel! This is why MVVM is so important for SwiftUI developers. If we didn't create a ViewModel for the HomeView, we would have to add all of the logic into the View, which would get very long and confusing.
*** LINKS:
Downloadable Resources: https://www.swiftful-thinking.com/dow...
CoinGecko API: https://www.coingecko.com/en/api
CoinModel API: https://api.coingecko.com/api/v3/coin...
Buy Me A Coffee: https://www.buymeacoffee.com/nicksarno
Next video: • Creating a data model and View to display ...
Last video: • Implement a custom and reusable search bar...
🤙 WELCOME BACK 🤙
WEBSITE: https://www.swiftful-thinking.com
DISCORD: / discord
GITHUB: https://github.com/SwiftfulThinking/
SAY THANKS: https://www.buymeacoffee.com/nicksarno
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: