Implement a custom and reusable search bar | SwiftUI Crypto App #10

Опубликовано: 01 Октябрь 2024
на канале: Swiftful Thinking
18,449
510

As you've probably noticed, we are downloading over 200 coins into the lists in our app. So far we have downloaded the JSON data, the image data, and displayed that in our List, but we don't have any way to search for a specific coin. So now it's time to add a search bar into our app!

Unfortunately, SwiftUI does not yet have a SearchBar() component that we can use directly (although UIKit does). So instead we will use a TextField and customize it to make it look like search bar! This gives us the ability to add extra customization, such as the "x" button we are going to add.

*** 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:    • Saving images to the File Manager | S...  
Last video:    • Filtering data based on search bar te...  

🤙 WELCOME BACK 🤙

WEBSITE: https://www.swiftful-thinking.com

DISCORD:   / discord  

GITHUB: https://github.com/SwiftfulThinking/

SAY THANKS: https://www.buymeacoffee.com/nicksarno