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

Stopwatch

Requirements

  • iOS 14.0+ ?
  • Xcode 14.0+ ?️
  • Swift 5.0+

Installation

  1. Clone the repository: [git clone] https://github.com/your-username/stopwatch.git

  2. Open Stopwatch.xcodeproj in Xcode.

  3. Build and run the project on the iOS Simulator or a connected device.

Usage

  1. Launch the Stopwatch application on your iOS device or simulator.

  2. The main screen displays the current elapsed time.

  3. Tap the “Start” button to begin the stopwatch. Tap it again to pause the timer.

  4. 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:

  1. Fork the repository and clone it locally.

  2. Create a new branch for your feature or bug fix.

  3. Implement your changes, following the existing code style and conventions.

  4. Write appropriate tests for your code changes.

  5. Commit your changes and push them to your forked repository.

  6. Open a pull request, providing a detailed description of your changes.

GitHub

View Github