Settings menu, manual changes upload

This commit is contained in:
Christoph Hagen
2018-10-17 11:46:16 +02:00
parent 8ed9a6046d
commit bd63eb38e2
10 changed files with 401 additions and 139 deletions

View File

@ -0,0 +1,48 @@
//
// 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")
}
}
}