Giter Club home page Giter Club logo

todo-mvvm's Introduction

TodoList App using Swift SwiftUI SwiftData (with mvvm pattern

A SwiftUI-based iOS application for managing todos with tags.

Features

  • Create, read, update, and delete todos
  • Add tags to todos
  • Filter todos by status (all, finished, unfinished)
  • Search todos
  • Edit existing todos
  • Automatic data persistence using SwiftData

Project Structure

The project follows a standard SwiftUI app structure:

  • ToDoApp.swift: The main app file
  • Models/: Contains the data models (Todo.swift, Tag.swift)
  • Views/: Contains all the SwiftUI views
  • ViewModels/: Contains the view models (TodoViewModel.swift)

Key Components

Models

  • Todo: Represents a todo item with properties like name, start date, completion status, and associated tags.
  • Tag: Represents a tag that can be associated with multiple todos.

Views

  • RootView: The main view containing the tab navigation.
  • TodoView: Displays the list of todos and handles filtering and searching.
  • TodoEditorView: Handles creating and editing todos.
  • TagView: Displays and manages tags.
  • SettingView: Contains app settings (currently with placeholder toggles).

ViewModel

  • TodoViewModel: Manages the todo data and operations, including filtering and CRUD operations.

Getting Started

  1. Clone the repository
  2. Open the project in Xcode
  3. Build and run the app on a simulator or device

Requirements

  • iOS 17.5+
  • Xcode 15.4+
  • Swift 5.0+

Future Improvements

  • Implement iCloud sync functionality
  • Add more robust tag management features
  • Implement auto-delete for completed todos
  • Enhance the UI/UX design

todo-mvvm's People

Contributors

hy-rf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.