Filtering data based on search bar text using Combine | SwiftUI Crypto App #11
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/downloads
- CoinGecko API: https://www.coingecko.com/en/api
- CoinModel API: https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=250&page=1&sparkline=true&price_change_percentage=24h
- Buy Me A Coffee: https://www.buymeacoffee.com/nicksarno
Next video: https://youtu.be/INZz_Helh0A
Last video: https://youtu.be/p-arH7VO4jk
🤙 WELCOME BACK 🤙
WEBSITE: https://www.swiftful-thinking.com
DISCORD: https://discord.gg/tSzJGx9RwE
GITHUB: https://github.com/SwiftfulThinking/
SAY THANKS: https://www.buymeacoffee.com/nicksarno
Видео Filtering data based on search bar text using Combine | SwiftUI Crypto App #11 канала Swiftful Thinking
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/downloads
- CoinGecko API: https://www.coingecko.com/en/api
- CoinModel API: https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=250&page=1&sparkline=true&price_change_percentage=24h
- Buy Me A Coffee: https://www.buymeacoffee.com/nicksarno
Next video: https://youtu.be/INZz_Helh0A
Last video: https://youtu.be/p-arH7VO4jk
🤙 WELCOME BACK 🤙
WEBSITE: https://www.swiftful-thinking.com
DISCORD: https://discord.gg/tSzJGx9RwE
GITHUB: https://github.com/SwiftfulThinking/
SAY THANKS: https://www.buymeacoffee.com/nicksarno
Видео Filtering data based on search bar text using Combine | SwiftUI Crypto App #11 канала Swiftful Thinking
SwiftUI Filter SwiftUI filtering SwiftUI filter with MVVM SwiftUI mvvm SwiftUI how to filter SwiftUI how to add filter SwiftUI search SwiftUI how to add search SwiftUI filtering with Search SwiftUI filter textfield SwiftUI filter for text filter for text SwiftUI how to filter SwiftUI how to search SwiftUI
Комментарии отсутствуют
Информация о видео
4 июня 2021 г. 20:30:01
00:17:15
Другие видео канала