Caps-iOS/CapCollector/Data/UserDefaults.swift

49 lines
1.1 KiB
Swift
Raw Normal View History

2018-10-17 11:46:16 +02:00
//
// 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 notUploadedCapCount: Int {
get {
return UserDefaults.standard.integer(forKey: "notUploadedCaps")
}
set {
UserDefaults.standard.set(newValue, forKey: "notUploadedCaps")
}
}
static var notUploadedImageCount: Int {
get {
return UserDefaults.standard.integer(forKey: "notUploadedImages")
}
set {
UserDefaults.standard.set(newValue, forKey: "notUploadedImages")
}
}
}