Create an animated custom progress bar in SwiftUI

  Рет қаралды 2,485

Mike Mikina

Mike Mikina

Күн бұрын

Пікірлер: 11
@popski.
@popski. Жыл бұрын
A very useful video with clear instructions on how to create a progress bar. Thanks!
@mikemikina
@mikemikina Жыл бұрын
I'm glad you liked it! 😊
@Steph_d_a
@Steph_d_a Жыл бұрын
Amazing video!
@mikemikina
@mikemikina Жыл бұрын
Thanks!
@SonHD92
@SonHD92 10 ай бұрын
Hi thank you for this tutorial, I put this custom progress in a scrollview. It's work fine when the app first run, but when I swipe left, the progress is hided then I swipe back to unhide, the animation is freezed. Do you know why?
@mikemikina
@mikemikina 10 ай бұрын
How do you start the animation? To what element is the progress bar connected?
@SonHD92
@SonHD92 10 ай бұрын
@@mikemikina i put it in onAppear just like you did. All I know is onAppear just call only once when the view rendered, i tried to trigger it by a flag from parent view but not work. Is there anyway to force the view re-render? I don’t have much experience with SwiftUI, just move from UIKit to SwiftUI for 2 months
@mikemikina
@mikemikina 10 ай бұрын
Not exactly, onAppear should be called each time the view appears on screen, usually when it disappears and appears again, it will be called again. Forcing a view to re-render doesn't work like it used to in UIKit. You have to think about it a little differently. The view is more like a data driven, it adapts to the data you provide. I would focus on a part where data should drive the progress view. It's hard to tell more without seeing the code. If you could post a sample on Github, it would be much easier 🙂
@SonHD92
@SonHD92 10 ай бұрын
@@mikemikina You're right. But as I said before, I have to put the progress view in a scrollview due to our project component. Then I think views inside scrollview are not trigger both onAppear or onDisapear when swipe backward/forward. I have to force refresh the view to make it trigger the onApear by recalled API with new data and thankfully my PO agree with this temporary solution :)
@mechanicalconcepts1527
@mechanicalconcepts1527 Жыл бұрын
same animation how to run based on every seconds 1% increase container width of screen
@mikemikina
@mikemikina Жыл бұрын
Not sure if I got this, every second you would like to increase you progress bar by 1% of the whole screen size? 🤔
The beginner's guide to setting up an iOS project
31:11
Mike Mikina
Рет қаралды 490
new critical linux exploit has been hiding for 10 years.
9:32
Low Level
Рет қаралды 150 М.
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 154 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 7 МЛН
Create an Animated Mesh Gradient in SwiftUI
17:07
DesignCode
Рет қаралды 1,7 М.
I Made an iOS App in MINUTES with This AI Tool!
13:20
Creator Magic
Рет қаралды 296 М.
FASTEST way to clone a FULL frontend (CopyCoder + Cursor Tutorial)
10:38
Create a Custom Dialog in SwiftUI
16:52
Mike Mikina
Рет қаралды 9 М.
Use SwiftUI in an existing UIKit project
17:12
Mike Mikina
Рет қаралды 3,3 М.
I Tested No Code AI App Makers and Found the BEST
16:02
Creator Magic
Рет қаралды 34 М.
Super Power Scroll Views - SwiftUI - iOS 17
9:14
Sean Allen
Рет қаралды 29 М.
How to get a view size in SwiftUI
12:09
Mike Mikina
Рет қаралды 1,5 М.