Stopwatch
Stopwatch and Timer are simple iOS applications developed using Swift and UIKit. They provide stopwatch and timer functionalities to measure elapsed time accurately. The projects follow the MVVM-C (Model-View-ViewModel-Coordinator) design pattern for clean and maintainable architectures.
Features
Stopwatch:
- Start, pause, and reset the stopwatch.
- Accurate measurement of elapsed time.
- User-friendly interface with intuitive controls.
Timer:
- Set a specific countdown duration.
- Start, pause, and reset the timer.
- Alert notification when the timer reaches zero.
Screenshots
Requirements
- iOS 14.0+ ?
- Xcode 14.0+ ?️
- Swift 5.0+
Installation
-
Clone the repository: [git clone] https://github.com/your-username/stopwatch.git
-
Open
Stopwatch.xcodeproj
in Xcode. -
Build and run the project on the iOS Simulator or a connected device.
Usage
-
Launch the Stopwatch application on your iOS device or simulator.
-
The main screen displays the current elapsed time.
-
Tap the “Start” button to begin the stopwatch. Tap it again to pause the timer.
-
To reset the stopwatch, tap the “Reset” button. This will set the elapsed time back to zero.
Architecture
The Stopwatch application follows the MVVM-C (Model-View-ViewModel-Coordinator) design pattern for a structured and scalable architecture. Here’s a brief overview of each component:
- Model: Contains the stopwatch logic and data.
- View: Displays the stopwatch user interface and handles user interactions.
- ViewModel: Connects the model and view, providing data and actions for the view.
- Coordinator: Handles the navigation flow and transitions between different screens.
Contributing
Thank you for considering contributing to Stopwatch! If you’d like to contribute, please follow these guidelines:
-
Fork the repository and clone it locally.
-
Create a new branch for your feature or bug fix.
-
Implement your changes, following the existing code style and conventions.
-
Write appropriate tests for your code changes.
-
Commit your changes and push them to your forked repository.
-
Open a pull request, providing a detailed description of your changes.