// // 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 useMobileNet: Bool { get { return UserDefaults.standard.bool(forKey: "mobileNet") } set { UserDefaults.standard.set(newValue, forKey: "mobileNet") } } static var folderNotCreated: [Int] { get { return UserDefaults.standard.array(forKey: "folders") as? [Int] ?? [] } set { UserDefaults.standard.set(newValue, forKey: "folders") } } }