SwiftUI Tutorial: Progress Bar with Animation

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025
  • This swiftui tutorial shows you how to create an animated progress bar in xcode. SwiftUI is one of the most beginner-friendly ways to learn iOS development with Swift.
    This tutorial uses Xcode 12 and Swift 5.
    Great place for beginners to start iOS Development with Swift: gumroad.com/a/...
    Instagram: / logankoshenka
    Twitter: / logankoshenka
    This video and description may contain affiliate links. If you click on a link and make a purchase, I may receive a commission. Money earned helps to support my channel.
    #SwiftUI #Tutorial #iOSDevelopment

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

  • @mowerguy4u
    @mowerguy4u 3 года назад +4

    That was a great tutorial. Ive been self teaching swift on and off for a little while, still a complete noob, but I never realized you could command click to embed VStacks lol. Adding information like that in your tutorials is very helpful!

  • @lisan_al_g4ib
    @lisan_al_g4ib 11 дней назад

    Cool! Thanks for the help! With my OCD I made an adjustment so the inner rounded rectangle is at the very least a circle, otherwise it won't lie inside its gray container at smaller percentages, so I made this change to calculate the multiplier:
    let halfOfHeight = (height / 2)
    let progressWithMin = percent > halfOfHeight ? percent : halfOfHeight
    let multiplier = progressWithMin / 100

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

    Stumbled across the video yesterday and have to say wow - you make it look so simple - I had implemented a energy bar in my game using multiple slspritenodes and hiding or showing each one depending on the value lol / looks so much easier your way

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

      haha thanks, glad you like it!

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

      @@logankoshenka I too am learning this new fangled swift thing… (I’m old - grew up on cobol and basic) lol - I may reach out to you if I get stuck with other things - hope you don’t mind… sorry I don’t do any of that instratwitter thing 😂

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

      haha of course not, feel free!

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

    Awesome tutorial Logan, still not working with SwiftUI yet, but I can say that you make it look pretty simple and clear,

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

    Awesome video! Keep posting about SwiftUI 👌

  • @SacredSpiritMeditation
    @SacredSpiritMeditation 2 года назад +2

    an outstanding tutorial.. thanks a bunch.... Easy to understand and quite effective in its implementation

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

      Thank you for watching! Glad you liked it.

  • @malikTaha425
    @malikTaha425 Год назад +1

    I am working on swiftui widgetkit, and this helps me a-lot thanks

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

    So good! 👏 Thanks for the walk-through

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

    super awesome!

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

    Really helpful, and legit a good tutorial

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

    Love goes out to u dude

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

    this is so interesting and helpful!!!! ❤️

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

    Good Job!!! Nice Video!!

  • @johnpill1
    @johnpill1 Год назад +1

    Looks great however the animation approach has been deprecated. How would you replace this now?

    • @johnpill1
      @johnpill1 Год назад +1

      oh, you just add the variable value you are changing on.

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

      correct! sorry - just saw this! you good?

    • @johnpill1
      @johnpill1 Год назад +1

      @@logankoshenka yeah answered my own question in like 10 secs. It looks like it wasn’t completely deprecated they just added the value.

  • @imbored6010
    @imbored6010 Год назад +1

    I tried using the .animation line in my own code to get the same spring effect but it says that its no longer supported, how would I do this now.

    • @imbored6010
      @imbored6010 Год назад +1

      never mind lol i saw someone else had the same question

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

      yes just slightly different now - let me know if you need help!

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

      @@logankoshenka yea im also trying to make it so that you dont even need the button to make the bar move. do you know how to do that

  • @huseyincangenc4307
    @huseyincangenc4307 Год назад +1

    I'm the 300th person to like 🎉🥳

  • @anhhanry7167
    @anhhanry7167 2 года назад +1

    just stumble across this video today and it's great tutorial video, but I use Navigation link (because I would like to use 1 big project to include many instance/example) to access to this progressbar view, how could I achieve this same variable @Star var ( and animation ) ?

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

      Thank you! And I’m not sure I fully understand your question - can you elaborate?

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

    EXCELLENT !!!

  • @1111Seraphim
    @1111Seraphim 2 года назад +1

    Creat tutorial : move your multiplier out of body ;)
    var multiplier: CGFloat {
    progressBarWidth / 100
    }

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

    nice video)) thanks)

  • @halfoflemon
    @halfoflemon Год назад +1

    "It works!" and bug appears right away, on 1% 😂