SkillAgentSearch skills...

ClockApp

An analog clock app with time, alarm and stopwatch feature

Install / Use

/learn @tmusabe/ClockApp
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ClockApp

ClockApp contains analog view of watch. It is an iOS app which is developed by SwiftUl and also conform MVVM architecture

<image src="Images/ClockApp-Scene1.png" width=200> <image src="Images/ClockApp-Scene2.png" width=200> <image src="Images/ClockApp-Scene3.png" width=200>

Features

  • Set Alarm
  • Use Stopwatch
  • View Current Time

<img src="/Images/AlarmView.gif" width="200" /> - <img src="/Images/StopwatchView.gif" width="200" /> - <img src="/Images/TimeView.gif" width="200" />

Tech

  • SwiftUI
  • Swift 5.0
  • MVVM architecture

Components

| 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 |

Critical Logics

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)
                }
        }
    }

Motivation and Credit

License

MIT

View on GitHub
GitHub Stars23
CategoryDevelopment
Updated9mo ago
Forks1

Languages

Swift

Security Score

87/100

Audited on Jun 11, 2025

No findings