49 lines
1.1 KiB
Swift
49 lines
1.1 KiB
Swift
|
//
|
||
|
// 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")
|
||
|
}
|
||
|
}
|
||
|
}
|