ClockApp contains analog view of watch. It is an iOS app which is developed by SwiftUl and also conform MVVM architecture
- Set Alarm
- Use Stopwatch
- View Current Time
- SwiftUI
- Swift 5.0
- MVVM architecture
| File | Description |
|---|---|
| TickShape | Generate tick in the circumference |
| ClockView | Design the analog clock view |
| NeedleView | Generate needle for minute, hour, second |
| NumberView | Create circular number view |
| CheckBoxView | Make selectable checkbox |
| ActionButtonStyle | Circular button style |
| RoundRectangleButtonStyle | RoundRectangle button style |
Selecting any point on clock changing time is done with creating hidden niddle
@ViewBuilder func getSelectableView(width: CGFloat, height: CGFloat) -> some View {
ForEach(0..<360){ index in
NeedleView(width: width, height: height, color: Color.backgroundColor.opacity(0.001), bottomLineHeight: 30)
.rotationEffect(.degrees(Double(index)))
.onTapGesture {
updateNeedlePosition(position: index)
}
}
}- The design and stopwatch logic is motivated from StepByStep Learning - iOS Programming Youtube Channel
- The time logic is inheritted from Kavsoft Youtube Channel
MIT





