mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-04-10 19:17:07 +02:00
Add examples project
This commit is contained in:
21
Examples/Example To-Do App/SwiftUITodo/Task.swift
Executable file
21
Examples/Example To-Do App/SwiftUITodo/Task.swift
Executable file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// Task.swift
|
||||
// SwiftUITodo
|
||||
//
|
||||
// Created by Suyeol Jeon on 03/06/2019.
|
||||
// Copyright © 2019 Suyeol Jeon. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct Task: Equatable, Hashable, Codable, Identifiable {
|
||||
let id: UUID
|
||||
var title: String
|
||||
var isDone: Bool
|
||||
|
||||
init(title: String, isDone: Bool) {
|
||||
self.id = UUID()
|
||||
self.title = title
|
||||
self.isDone = isDone
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user