FlipClock is a visually appealing and functional clock application implemented using SwiftUI. It features animated flip clock digits to display the current time in an engaging and modern way.
- Smooth flipping animation for time changes.
- Modular architecture for flexibility and scalability.
- Fully implemented using SwiftUI for declarative UI development.
- Customizable appearance for individual flip views.
The project consists of the following main components:
- Displays the complete clock interface with hours, minutes, and seconds.
- Combines multiple
FlipView
components with separators (:
).
- Manages the time state and triggers updates for
FlipView
components. - Implements a timer to update time every second.
- A single digit display with animated top and bottom halves.
- Uses
SingleFlipView
for each half.
- Renders individual halves of a flip digit.
- Provides alignment and padding configurations for top and bottom segments.
- Launch the app to view the clock interface.
- Observe the smooth flip animations as the time changes every second.
To customize the appearance or behavior:
- Modify the
FlipViewModel
for animation timing or time formatting. - Adjust the
SingleFlipView
for padding, font size, or alignment. - Add/Modify the
flip_background
&text_color
colors in assets,
This project was inspired by traditional flip clocks and aims to bring the nostalgic charm of flip digits into a modern app. Special thanks to the SwiftUI framework for simplifying declarative UI development.