Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- enum Importance{
- case unimportant
- case common
- case important
- }
- struct Note{
- let uid, title, content: String
- let color: UIColor
- let importance: Importance
- let selfDestructionDate: Date?
- init(uid: String = UUID().uuidString, title: String, content: String, color: UIColor = UIColor.white, importance: Importance, selfDestructionDate: Date? = nil) {
- self.uid = uid
- self.title = title
- self.content = content
- self.color = color
- self.importance = importance
- self.selfDestructionDate = selfDestructionDate
- }
- }
- var a = Note(uid: "uid", title: "title", content: "content", color: UIColor.black, importance: Importance.important)
- print(a)
- var b = Note(title: "title2", content: "content2", importance: Importance.unimportant)
- print(b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement