SwiftUI - Loading View | Activity Indicator

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024
  • 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

Комментарии • 36

  • @seanallen
    @seanallen  3 года назад +3

    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.

    • @ahmedmalakai9753
      @ahmedmalakai9753 3 года назад

      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

  • @alfredomerino1254
    @alfredomerino1254 Год назад +4

    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!

    • @seanallen
      @seanallen  Год назад

      Glad you find the tutorials helpful, Alfredo. Happy to save you time :)

  • @EmmaKAlexandra
    @EmmaKAlexandra 3 года назад +6

    I wasn’t familiar with the .systemBackground color or this technique of doing a timeout with DispatchQueue. Super handy. Thanks Sean!

    • @seanallen
      @seanallen  3 года назад +3

      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.

  • @Kayzer606
    @Kayzer606 6 месяцев назад +1

    Great, thank you!

    • @seanallen
      @seanallen  6 месяцев назад

      You are welcome!

  • @JustinHold
    @JustinHold Год назад

    Great tutorial. Very easy to follow. Thanks!

  • @jaded4831
    @jaded4831 3 года назад +1

    Perfect video i needed thanks man

  • @anujchoubey2453
    @anujchoubey2453 3 года назад

    Much awaited topic. Nice 👌

  • @juancarlosrangel2128
    @juancarlosrangel2128 Год назад

    If my current view has a NavigationView, is it possible to cover the NavigationBar as well?

  • @clayfulgham21
    @clayfulgham21 2 года назад

    Excellent ! Very well done as always!

  • @samirpandey2577
    @samirpandey2577 Год назад

    Can I reuse this LoadingView in Swift as well? If so, how do I do it?

  • @kristorres4558
    @kristorres4558 3 года назад +1

    I have almost the same exact implementation of the LoadingView in my Tensai app. 😁

    • @seanallen
      @seanallen  3 года назад +1

      Great minds think alike.

  • @SwiftUI_ios_information
    @SwiftUI_ios_information Год назад

    But actually how to show and hide loader dynamically not with timer?

  • @reece5863
    @reece5863 2 года назад

    Great video. Thanks.

  • @JonesJr876
    @JonesJr876 3 года назад

    I enjoyed the video.

  • @adhamelkelany
    @adhamelkelany 3 года назад +1

    Very helpful for someone learning UI Design for ios, Thank you!

    • @seanallen
      @seanallen  3 года назад +1

      Happy to help, Adham.

  • @thomasfrank8379
    @thomasfrank8379 3 года назад

    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?

    • @seanallen
      @seanallen  3 года назад +1

      If you want to be notified when multiple network calls are completed, I'd look into a concept on DownloadGroups in Swift.

  • @Lagos08
    @Lagos08 2 года назад

    Thanks a lot !

  • @cristopherescorcia3276
    @cristopherescorcia3276 3 года назад

    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

    • @seanallen
      @seanallen  3 года назад +2

      Yes, this is possible. You would build this view inside the "label" portion of a button in SwiftUI.

  • @elhoussainelidrysy6856
    @elhoussainelidrysy6856 3 года назад

    good thanks

  • @cineverseproductions
    @cineverseproductions 3 года назад +1

    SwiftUI is similar to React Native. ☝️

  • @rahuljamba5846
    @rahuljamba5846 2 года назад

    Thanks a lot seen

  • @coolerr2006
    @coolerr2006 3 года назад

    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.

    • @seanallen
      @seanallen  3 года назад

      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.

  • @judy8821
    @judy8821 3 года назад

    Great

  • @tariqAlmazyad
    @tariqAlmazyad 3 года назад

    Finally we can move away from UIKit (old Master guy ) for a little

  • @anshaaad
    @anshaaad 3 года назад

    👍