How to create a Timer in Xcode (SwiftUI / iOS)

preview_player
Показать описание
In this video I will be showing you how you can create a timer in Xcode using SwiftUI. This is great for making simple countdown events during the execution of your app.

Рекомендации по теме
Комментарии
Автор

Straight to the point! the other videos are unnessecarily complicated and add too much extra functions

koferperk
Автор

simple code that allows a lot to understand great job thanks

mario-zzft
Автор

I get the error: 
- Type 'Timer' has no member 'publish'. 
- Cannot infer contextual base in reference to member 'main'.

- Cannot infer contextual base in reference to member 'common'

Could you help me with this error? Why does it work for you?

Poeeee
Автор

This is very good tutorial. thanks.
i wanna add minute with the seconds. like 10:00(mm:ss). how can add this?

Shgtfrhtdeff
Автор

Hi i wanna make a countdown button like every 10 sec you can tap. I can't find anywhere what I am looking for :(

SOK-gnhw
Автор

it will be better, if button will be not "timerRunning = true", but "self.timerRunning.toggle()".
Because if button is toggle you can turn it off and on

ХейтерСолянки
visit shbcf.ru