// // UserDefaults.swift // CapCollector // // Created by Christoph on 16.10.18. // Copyright © 2018 CH. All rights reserved. // import Foundation final class Persistence { static var recognizedCapCount: Int { get { return UserDefaults.standard.integer(forKey: "recognizedCaps") } set { UserDefaults.standard.set(newValue, forKey: "recognizedCaps") } } static var newImageCount: Int { get { return UserDefaults.standard.integer(forKey: "newImages") } set { UserDefaults.standard.set(newValue, forKey: "newImages") } } static var lastUploadedCapCount: Int { get { return UserDefaults.standard.integer(forKey: "lastUploadedCaps") } set { UserDefaults.standard.set(newValue, forKey: "lastUploadedCaps") } } static var lastUploadedImageCount: Int { get { return UserDefaults.standard.integer(forKey: "lastUploadedImages") } set { UserDefaults.standard.set(newValue, forKey: "lastUploadedImages") } } static var squeezenet: Bool { get { return UserDefaults.standard.bool(forKey: "squeezenet") } set { UserDefaults.standard.set(newValue, forKey: "squeezenet") } } static var resnet: Bool { get { return UserDefaults.standard.bool(forKey: "resnet") } set { UserDefaults.standard.set(newValue, forKey: "resnet") } } static var xcode: Bool { get { return UserDefaults.standard.bool(forKey: "xcode") } set { UserDefaults.standard.set(newValue, forKey: "xcode") } } static var folderNotCreated: [Int] { get { return UserDefaults.standard.array(forKey: "folders") as? [Int] ?? [] } set { UserDefaults.standard.set(newValue, forKey: "folders") } } }