SwiftUI - Loading View | Activity Indicator
HTML-код
- Опубликовано: 7 фев 2025
- In today's video I show you how to create a basic loading view for your iOS app in SwiftUI and iOS 14. This tutorial was created in Xcode 12.3.
SwiftUI DatePicker Documentation:
developer.appl...
If you like my teaching or presentation style, I've started creating my own courses:
seanallen.teac...
Twitter:
/ seanallen_dev
Link to my book - How I Became an iOS Developer:
gumroad.com/l/...
Hired.com:
hired.com/x/1n01g
Check out my podcast, iOS Dev Discussions:
itunes.apple.c...
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Ray Wenderlich Books:
store.raywende...
Ray Wenderlich Videos:
store.raywende...
Paul Hudson's Hacking With Swift:
gumroad.com/a/...
Learn Advanced Swift Here:
gumroad.com/a/...
Links to my iOS Dev Setup & iOS Dev Book Recommendations
www.amazon.com...
#swift #softwaredeveloper #iosdeveloper
If you enjoy my teaching/presentation style, I started creating my own courses available at seanallen.teachable.com. You can watch the first ~10% of each course for free to get a feel for it.
you all probably dont give a damn but does anyone know a trick to get back into an Instagram account??
I somehow lost the login password. I would love any tips you can give me
What took hours and hours of reading and trying out, you showed it in less than 8 minutes. Seriously is why I love your tutorials!
Glad you find the tutorials helpful, Alfredo. Happy to save you time :)
I wasn’t familiar with the .systemBackground color or this technique of doing a timeout with DispatchQueue. Super handy. Thanks Sean!
I love these types of comments. It happens all the time that people will watch my video even though they know the main topic (like a loading view), but pick up some little thing I do that's not even related. I love it.
Great tutorial. Very easy to follow. Thanks!
Much awaited topic. Nice 👌
Perfect video i needed thanks man
Glad I could help
Excellent ! Very well done as always!
Great video. Thanks.
I enjoyed the video.
Great, thank you!
You are welcome!
Can I reuse this LoadingView in Swift as well? If so, how do I do it?
If my current view has a NavigationView, is it possible to cover the NavigationBar as well?
But actually how to show and hide loader dynamically not with timer?
I have almost the same exact implementation of the LoadingView in my Tensai app. 😁
Great minds think alike.
Very helpful for someone learning UI Design for ios, Thank you!
Happy to help, Adham.
Thanks a lot !
Happy to help!
good thanks
Thanks a lot seen
SwiftUI is similar to React Native. ☝️
Good stuff. Thanks for all the great videos. Trying to figure out how to implement this while loading several images / news articles in a list view. How can I be notified when all is loaded? Any tips?
If you want to be notified when multiple network calls are completed, I'd look into a concept on DownloadGroups in Swift.
Hi Sean, can the activity indicator be used inside a button? Like for example user updates his information and when pressed save that “Save” text replace it with the activity indicator instead the entire view
Yes, this is possible. You would build this view inside the "label" portion of a button in SwiftUI.
Great
This solution only looks good with one network call. If you change isLoading to true again, the loading view sits on top of the example screen. Causing ugly UI clipping.
If you're making more than one network call (i.e. nested network calls or in a download group), you would toggle the isLoading variable in the appropriate place. If it's nested, you would toggle isLoading only when the nested network call is done (or fails). If multiple network calls are in a download group then you toggle isLoading in the completion hander of the download group.
👍
Finally we can move away from UIKit (old Master guy ) for a little