Member-only story

How to make Analog Clock using SwiftUI?

XCode-11.3,+ macOS-Catalina and iOS-13+

Prafulla Singh
2 min readMay 31, 2020
  1. Create Time Observable

Create an ObservableObject with Timer to update UI every Second.

Output

2. Create Clock Needles

Every Needle will be a two-dimensional shape. This Shape will start to form the center of the view.

Output

Moving Clock Needles

3. Draw Clock Ticks and Numbers:

  • We need to draw 60 ticks. Every tick represents one…

--

--

Prafulla Singh
Prafulla Singh

Responses (1)