Skip to content

Reminder is an iOS app built with Swift and UIKit (entirely programmatic) to help users create and manage reminders. It follows the MVVM pattern, utilizes UserDefaults for local storage, and demonstrates best practices in data exchange via delegates, notifications, and closures.

Notifications You must be signed in to change notification settings

icommunitycomtr/reminder-example-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reminder Example App

A task management tool designed to help users create, manage, and track their reminders efficiently. Built using Swift and UIKit, this application provides a clean and intuitive interface for users to interact with their reminders.

Table of Contents


Overview

The Reminder application enables users to create, track, and manage reminders for specific dates and times. It uses MVVM to separate business logic (ViewModel) from the UI (View), and leverages UserDefaults for data persistence.


Features

  • User-Friendly Interface
    A clean and intuitive UI that allows users to easily navigate through their reminders.

  • Date Selection
    The app provides a date picker and a custom horizontal date selector using UICollectionView, enabling precise date selection.

  • Dynamic Updates
    The application updates the reminder list dynamically as reminders are added or modified.

  • Dynamic Text Support
    The text fields and labels handle multiline and extended text gracefully.

  • UserDefaults Storage
    Reminders persist locally on the device through UserDefaults (managed by StorageManager).

  • Native Date Picker Components
    Utilizes Apple’s UIDatePicker for a consistent iOS look and feel.

  • Light/Dark Mode Support
    Uses system colors (.label, .secondaryLabel, etc.) to support dynamic appearance across both light and dark modes.


Architecture

MVVM Architecture Diagram

The application adopts a Model-View-ViewModel (MVVM) architecture:

  • Model
    Represents the data structure of the reminders. The Reminder struct encapsulates properties such as title, date, and completion status.

  • View

    • Built programmatically using UIKit.
    • Includes HomeViewController (main screen with reminders list), CreateViewController (reminder creation screen), and custom UI components like HomeTopView.
  • ViewModel

    • HomeViewModel and CreateViewModel contain the core logic:
      • Filtering, toggling completion status, sorting reminders (HomeViewModel).
      • Managing new reminder creation (CreateViewModel).
    • Serves as the bridge between the Model and View, ensuring the View remains lightweight.

Data Exchange

This project uses multiple patterns to pass data and events between components:

  1. Protocols & Delegates

    • CreateViewModelOutputProtocol and other protocol definitions allow the ViewModel to communicate changes back to the View.
    • UITextViewDelegate, UIPopoverPresentationControllerDelegate, and similar UIKit delegates handle UI events.
  2. Closures

    • In DatePickerManager, closures capture user-selected date/time and pass it back to the presenting controller.
  3. Observers (NotificationCenter)

    • When a new reminder is created, a .didCreateNewReminder notification is posted.
    • HomeViewController listens for this notification to refresh the list dynamically.
  4. Dependency Injection

    • The SceneDelegate injects HomeViewModel into HomeViewController.
    • The CreateViewController is initialized with a CreateViewModel to ensure the ViewModel is available from creation time.

Technologies Used

  • Swift
    The primary language for iOS development in this project.

  • UIKit
    For building the user interface programmatically (no Storyboards).

  • UserDefaults
    Used to persist and retrieve reminders through a dedicated StorageManager.

  • UIDatePicker
    Provides native date and time picking functionality.

  • UICollectionView & UITableView

    • UICollectionView for the horizontal date selector at the top of the home screen.
    • UITableView for listing reminders (with custom cells).

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/reminder-example-app.git

    This command will download all the project files to your local machine.

  2. Navigate into the Project Folder

    cd reminder-example-app/Reminder

    Change your current directory to the folder that contains the Xcode project.

  3. Open the Project in Xcode

    open Reminder.xcodeproj

    Launch the Xcode project by opening the .xcodeproj file

  4. Build and Run

    • Select a simulator or a connected iOS device from the Scheme menu in the Xcode toolbar.
    • Click the Run (▶) button to build the project and launch the app.

Usage

  1. Home Screen

    • At the top, you’ll find a horizontal date selector implemented via a collection view.
    • Below the selector, a list of reminders is displayed for the currently focused date.
  2. Adding a Reminder

    • Tap the plus (+) icon on the home screen to open CreateViewController.
    • Enter your reminder’s title, select the desired date/time, and tap Save.
    • The new reminder instantly appears on the home screen for the selected date.
  3. Viewing & Managing Reminders

    • The HomeViewController dynamically filters and shows only the reminders belonging to the selected date.
    • Tap any reminder in the list to toggle its completion status (marked as complete or incomplete).
  4. Changing Dates

    • Swipe or tap through the horizontal date selector to quickly view different dates.
    • Alternatively, tap the calendar icon (in HomeTopView) to use a date picker popover for more precise selection.

Screenshots

Image 1 Image 2 Image 3
emptyDarkHome darkHome darkAddReminder
Empty Home (Dark Mode) Home (Dark Mode) Add Reminder (Dark Mode)
Image 4 Image 5 Image 6
emptyLightHome lightHome lightAddReminder
Empty Home (Light Mode) Home (Light Mode) Add Reminder (Light Mode)
Image 7 Image 8 Image 9
dateHomeDark dateAddDark hourAddDark
Date Picker Home (Dark Mode) Date Picker Add Reminder Day (Dark Mode) Date Picker Add Reminder Hour (Dark Mode)
Image 10 Image 11 Image 12
dateHomeLight dateAddLight hourAddLight
Date Picker Home (Light Mode) Date Picker Add Reminder Day (Light Mode) Date Picker Add Reminder Hour (Light Mode)

About

Reminder is an iOS app built with Swift and UIKit (entirely programmatic) to help users create and manage reminders. It follows the MVVM pattern, utilizes UserDefaults for local storage, and demonstrates best practices in data exchange via delegates, notifications, and closures.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages