How to use SDWebImage in SwiftUI | Swift Packages #1
ฝัง
- เผยแพร่เมื่อ 5 ส.ค. 2024
- Unlock the power of SDWebImage in your SwiftUI applications with our detailed tutorial. This video will guide you through integrating SDWebImage, a popular Swift Package for asynchronous image loading and caching, into your SwiftUI projects. Learn how to seamlessly display images from the web in your apps, improving user experience and app performance. Ideal for SwiftUI developers looking to enhance their app's image handling capabilities. This tutorial is a part of our Swift Packages series, aimed at providing practical skills for utilizing essential Swift Packages in SwiftUI. Subscribe for more tutorials on Swift Packages and advanced SwiftUI techniques.
🤙 WELCOME BACK 🤙
WEBSITE: www.swiftful-thinking.com
DISCORD: / discord
GITHUB: github.com/SwiftfulThinking/
SAY THANKS: www.buymeacoffee.com/nicksarno
🤙 #KEEPGOING 🤙
0:00 SDWebImageSwiftUI
02:34 What is SDWebImage?
03:20 ReadMe
04:41 import Package
07:35 Code start
10:12 Customizing
14:02 Implementation tips
19:41 The most comm on SwiftUI image bug
22:16 Preloading
24:53 Wrapping up
Thank you for sharing this informative video on SwiftUI package! It's been incredibly helpful for me. I would love to see more content like this in the future. Keep up the great work!.
Thanks a lot for your video Nick. With your tutorial I've solved an issue where I stuck for weeks! Great video!
Very informative 👏 thanks
Great stuff... 👍🏻 Thank you... 😊
Thank you for the video. How do we set access token as header for url which needs authentication to load image? the way we were doing in UIKit is returning 401 error?
👏🙌
I have tried to set the options for the cache to save to disk only:
WebImage(url: URL(string: url), context: [.storeCacheType: SDImageCacheType.disk]) { image in...
But when the app starts on the simulator, it crashes. Is there another way to disable the cache to memory so that the cash only stored on the disk?
Which macbook do you have?
🤯🤯
Amazing video as always. Would you use this package if you’re downloading images from Firebase/Firestore?
Absolutely, just need the url from where it’s saved in Storage
Thanks Nick. Will try it out. Assumed there would be security/access constraints to accessing those images using one of these packages. Thank you
@@acmcj It depends on your Storage security rules. If the url is public there is no problem
Otherwise I think you can use the Firebase API to get the image url first
@@SwiftfulThinking yeah thought so. So really should only use these packages for public images like profile pics etc. User stored images that would be behind security rules would need to do it “manually/traditional” like you’ve shown in your other videos. Thanks.
Hello Nick 😊. Thanks your tutorials...
1. How register account your site?
2. How see playlist for Git & Source Control and SwiftUI in Practice?
Those are coming to YT soon 👍
@SwiftfulThinking I'll be looking forward to it. Thank you.
Why did you choose SDWebImage over Kingfisher ?
(Sorry. I didn't hear that. 3:09)
SDWebImage seems easier to use and more performant. However, the next video is Kingfisher 😂
@@SwiftfulThinking it will be interesting to see the difference
SDWebImageSwiftUI has been updated to v3.0.0.
I think the code has to be modified a bit. 🤔
Ugh such bad timing 🤦
thanks Nick! Please do bootcamp for UIKit !)
Thanks Nick! BTW Can We have visionPro content please?
It’s not important to learn visionPro because it’s too expensive to buy it ,so you will have very poor audience .
give visionOS 2/3 years. It still is early and your audience is very limited.