Settings menu, manual changes upload
This commit is contained in:
48
CapCollector/Data/UserDefaults.swift
Normal file
48
CapCollector/Data/UserDefaults.swift
Normal 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")
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user