-
Notifications
You must be signed in to change notification settings - Fork 0
/
Demo.swift
712 lines (605 loc) · 21.8 KB
/
Demo.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
/*SVMPREFS [code generated using svmprefs version 2.0.0]
S demo | | RALL
V Bool | boolVar | boolVar | OBJC,REM,ISSET |
V Double | doubleVar | doubleVar | OBJC,REM,ISSET |
V Float | floatVar | floatVar | OBJC,REM,ISSET |
V Int | intVar | intVar | OBJC,REM,ISSET |
V Any? | optAny | optAny | OBJC,REM,ISSET |
V String? | optStringVar | optStringVar | OBJC,REM,ISSET |
V String | stringVar | stringVar | OBJC,REM,ISSET |
V Data? | optDataVar | optDataVar | OBJC,REM,ISSET |
V Data | dataVar | dataVar | OBJC,REM,ISSET |
V Date? | optDateVar | optDateVar | OBJC,REM,ISSET |
V Date | dateVar | dateVar | OBJC,REM,ISSET |
V [Any] | anyArray | anyArray | OBJC,REM,ISSET |
V [Bool] | boolArray | boolArray | OBJC,REM,ISSET |
V [Date] | dateArray | dateArray | OBJC,REM,ISSET |
V [Double] | doubleArray | doubleArray | OBJC,REM,ISSET |
V [Float] | floatArray | floatArray | OBJC,REM,ISSET |
V [Int] | intArray | intArray | OBJC,REM,ISSET |
V [String] | stringArray | stringArray | OBJC,REM,ISSET |
V [Bool]? | optBoolArray | optBoolArray | OBJC,REM,ISSET |
V [Date]? | optDateArray | optDateArray | OBJC,REM,ISSET |
V [Double]? | optDoubleArray | optDoubleArray | OBJC,REM,ISSET |
V [Float ]? | optFloatArray | optFloatArray | OBJC,REM,ISSET |
V [Int]? | optIntArray | optIntArray | OBJC,REM,ISSET |
V [String]? | optStringArray | optStringArray | OBJC,REM,ISSET |
V [[String: Any]] | arrayOfStringToAnyDictionary | arrayOfStringToAnyDictionary | OBJC,REM,ISSET |
V [[String: Any]]? | optArrayOfStringToAnyDictionary | optArrayOfStringToAnyDictionary | OBJC,REM,ISSET |
V [String: Any] | stringToAnyDictionary | stringToAnyDictionary | OBJC,REM,ISSET |
V [String: Any]? | optStringToAnyDictionary | optStringToAnyDictionary | OBJC,REM,ISSET |
V URL?| optUrlVar | optUrlVar | OBJC,REM,ISSET |
S extra | | RALL
V Bool | boolVar2 | boolVar2 | OBJC,REM,ISSET |
V Double | doubleVar2 | doubleVar2 | OBJC,REM,ISSET |
V Float | floatVar2 | floatVar2 | OBJC,REM,ISSET |
V Int | intVar2 | intVar2 | OBJC,REM,ISSET |
M demo | extra | boolVar | boolVar2
M demo | extra | doubleVar | doubleVar2
M demo | extra | floatVar | floatVar2
M demo | extra | intVar | intVar2
SVMPREFS*/
// swiftlint:disable file_length
// swiftlint:disable:next type_body_length
class MyDemoPreferences {
// ANYTHING HERE IS LEFT UNTOUCHED
// MARK: BEGIN demo ⬇⬇⬇ AUTO-GENERATED CODE - DO NOT EDIT ⬇⬇⬇
var demo = UserDefaults.standard
enum DemoKeys {
static let boolVar = "boolVar"
static let doubleVar = "doubleVar"
static let floatVar = "floatVar"
static let intVar = "intVar"
static let optAny = "optAny"
static let optStringVar = "optStringVar"
static let stringVar = "stringVar"
static let optDataVar = "optDataVar"
static let dataVar = "dataVar"
static let optDateVar = "optDateVar"
static let dateVar = "dateVar"
static let anyArray = "anyArray"
static let boolArray = "boolArray"
static let dateArray = "dateArray"
static let doubleArray = "doubleArray"
static let floatArray = "floatArray"
static let intArray = "intArray"
static let stringArray = "stringArray"
static let optBoolArray = "optBoolArray"
static let optDateArray = "optDateArray"
static let optDoubleArray = "optDoubleArray"
static let optFloatArray = "optFloatArray"
static let optIntArray = "optIntArray"
static let optStringArray = "optStringArray"
static let arrayOfStringToAnyDictionary = "arrayOfStringToAnyDictionary"
static let optArrayOfStringToAnyDictionary = "optArrayOfStringToAnyDictionary"
static let stringToAnyDictionary = "stringToAnyDictionary"
static let optStringToAnyDictionary = "optStringToAnyDictionary"
static let optUrlVar = "optUrlVar"
}
@objc var optAny: Any? {
get {
return demo.object(forKey: DemoKeys.optAny)
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optAny)
} else {
demo.removeObject(forKey: DemoKeys.optAny)
}
}
}
@objc var isOptAnySet: Bool {
return demo.object(forKey: DemoKeys.optAny) != nil
}
@objc func removeOptAnyPref() {
demo.removeObject(forKey: DemoKeys.optAny)
}
@objc var optStringVar: String? {
get {
return demo.string(forKey: DemoKeys.optStringVar)
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optStringVar)
} else {
demo.removeObject(forKey: DemoKeys.optStringVar)
}
}
}
@objc var isOptStringVarSet: Bool {
return demo.object(forKey: DemoKeys.optStringVar) != nil
}
@objc func removeOptStringVarPref() {
demo.removeObject(forKey: DemoKeys.optStringVar)
}
@objc var stringVar: String {
get {
return demo.string(forKey: DemoKeys.stringVar) ?? ""
}
set {
demo.set(newValue, forKey: DemoKeys.stringVar)
}
}
@objc var isStringVarSet: Bool {
return demo.object(forKey: DemoKeys.stringVar) != nil
}
@objc func removeStringVarPref() {
demo.removeObject(forKey: DemoKeys.stringVar)
}
@objc var optDataVar: Data? {
get {
return demo.data(forKey: DemoKeys.optDataVar)
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optDataVar)
} else {
demo.removeObject(forKey: DemoKeys.optDataVar)
}
}
}
@objc var isOptDataVarSet: Bool {
return demo.object(forKey: DemoKeys.optDataVar) != nil
}
@objc func removeOptDataVarPref() {
demo.removeObject(forKey: DemoKeys.optDataVar)
}
@objc var dataVar: Data {
get {
return demo.data(forKey: DemoKeys.dataVar) ?? Data()
}
set {
demo.set(newValue, forKey: DemoKeys.dataVar)
}
}
@objc var isDataVarSet: Bool {
return demo.object(forKey: DemoKeys.dataVar) != nil
}
@objc func removeDataVarPref() {
demo.removeObject(forKey: DemoKeys.dataVar)
}
@objc var optDateVar: Date? {
get {
return demo.object(forKey: DemoKeys.optDateVar) as? Date
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optDateVar)
} else {
demo.removeObject(forKey: DemoKeys.optDateVar)
}
}
}
@objc var isOptDateVarSet: Bool {
return demo.object(forKey: DemoKeys.optDateVar) != nil
}
@objc func removeOptDateVarPref() {
demo.removeObject(forKey: DemoKeys.optDateVar)
}
@objc var dateVar: Date {
get {
return demo.object(forKey: DemoKeys.dateVar) as? Date ?? Date.distantPast
}
set {
demo.set(newValue, forKey: DemoKeys.dateVar)
}
}
@objc var isDateVarSet: Bool {
return demo.object(forKey: DemoKeys.dateVar) != nil
}
@objc func removeDateVarPref() {
demo.removeObject(forKey: DemoKeys.dateVar)
}
@objc var anyArray: [Any] {
get {
return demo.array(forKey: DemoKeys.anyArray) ?? [Any]()
}
set {
demo.set(newValue, forKey: DemoKeys.anyArray)
}
}
@objc var isAnyArraySet: Bool {
return demo.object(forKey: DemoKeys.anyArray) != nil
}
@objc func removeAnyArrayPref() {
demo.removeObject(forKey: DemoKeys.anyArray)
}
@objc var boolArray: [Bool] {
get {
return demo.array(forKey: DemoKeys.boolArray) as? [Bool] ?? [Bool]()
}
set {
demo.set(newValue, forKey: DemoKeys.boolArray)
}
}
@objc var isBoolArraySet: Bool {
return demo.object(forKey: DemoKeys.boolArray) != nil
}
@objc func removeBoolArrayPref() {
demo.removeObject(forKey: DemoKeys.boolArray)
}
@objc var dateArray: [Date] {
get {
return demo.array(forKey: DemoKeys.dateArray) as? [Date] ?? [Date]()
}
set {
demo.set(newValue, forKey: DemoKeys.dateArray)
}
}
@objc var isDateArraySet: Bool {
return demo.object(forKey: DemoKeys.dateArray) != nil
}
@objc func removeDateArrayPref() {
demo.removeObject(forKey: DemoKeys.dateArray)
}
@objc var doubleArray: [Double] {
get {
return demo.array(forKey: DemoKeys.doubleArray) as? [Double] ?? [Double]()
}
set {
demo.set(newValue, forKey: DemoKeys.doubleArray)
}
}
@objc var isDoubleArraySet: Bool {
return demo.object(forKey: DemoKeys.doubleArray) != nil
}
@objc func removeDoubleArrayPref() {
demo.removeObject(forKey: DemoKeys.doubleArray)
}
@objc var floatArray: [Float] {
get {
return demo.array(forKey: DemoKeys.floatArray) as? [Float] ?? [Float]()
}
set {
demo.set(newValue, forKey: DemoKeys.floatArray)
}
}
@objc var isFloatArraySet: Bool {
return demo.object(forKey: DemoKeys.floatArray) != nil
}
@objc func removeFloatArrayPref() {
demo.removeObject(forKey: DemoKeys.floatArray)
}
@objc var intArray: [Int] {
get {
return demo.array(forKey: DemoKeys.intArray) as? [Int] ?? [Int]()
}
set {
demo.set(newValue, forKey: DemoKeys.intArray)
}
}
@objc var isIntArraySet: Bool {
return demo.object(forKey: DemoKeys.intArray) != nil
}
@objc func removeIntArrayPref() {
demo.removeObject(forKey: DemoKeys.intArray)
}
@objc var stringArray: [String] {
get {
return demo.stringArray(forKey: DemoKeys.stringArray) ?? [String]()
}
set {
demo.set(newValue, forKey: DemoKeys.stringArray)
}
}
@objc var isStringArraySet: Bool {
return demo.object(forKey: DemoKeys.stringArray) != nil
}
@objc func removeStringArrayPref() {
demo.removeObject(forKey: DemoKeys.stringArray)
}
@objc var optBoolArray: [Bool]? {
get {
return demo.array(forKey: DemoKeys.optBoolArray) as? [Bool]
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optBoolArray)
} else {
demo.removeObject(forKey: DemoKeys.optBoolArray)
}
}
}
@objc var isOptBoolArraySet: Bool {
return demo.object(forKey: DemoKeys.optBoolArray) != nil
}
@objc func removeOptBoolArrayPref() {
demo.removeObject(forKey: DemoKeys.optBoolArray)
}
@objc var optDateArray: [Date]? {
get {
return demo.array(forKey: DemoKeys.optDateArray) as? [Date]
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optDateArray)
} else {
demo.removeObject(forKey: DemoKeys.optDateArray)
}
}
}
@objc var isOptDateArraySet: Bool {
return demo.object(forKey: DemoKeys.optDateArray) != nil
}
@objc func removeOptDateArrayPref() {
demo.removeObject(forKey: DemoKeys.optDateArray)
}
@objc var optDoubleArray: [Double]? {
get {
return demo.array(forKey: DemoKeys.optDoubleArray) as? [Double]
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optDoubleArray)
} else {
demo.removeObject(forKey: DemoKeys.optDoubleArray)
}
}
}
@objc var isOptDoubleArraySet: Bool {
return demo.object(forKey: DemoKeys.optDoubleArray) != nil
}
@objc func removeOptDoubleArrayPref() {
demo.removeObject(forKey: DemoKeys.optDoubleArray)
}
@objc var optFloatArray: [Float ]? {
get {
return demo.array(forKey: DemoKeys.optFloatArray) as? [Float ]
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optFloatArray)
} else {
demo.removeObject(forKey: DemoKeys.optFloatArray)
}
}
}
@objc var isOptFloatArraySet: Bool {
return demo.object(forKey: DemoKeys.optFloatArray) != nil
}
@objc func removeOptFloatArrayPref() {
demo.removeObject(forKey: DemoKeys.optFloatArray)
}
@objc var optIntArray: [Int]? {
get {
return demo.array(forKey: DemoKeys.optIntArray) as? [Int]
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optIntArray)
} else {
demo.removeObject(forKey: DemoKeys.optIntArray)
}
}
}
@objc var isOptIntArraySet: Bool {
return demo.object(forKey: DemoKeys.optIntArray) != nil
}
@objc func removeOptIntArrayPref() {
demo.removeObject(forKey: DemoKeys.optIntArray)
}
@objc var optStringArray: [String]? {
get {
return demo.stringArray(forKey: DemoKeys.optStringArray)
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optStringArray)
} else {
demo.removeObject(forKey: DemoKeys.optStringArray)
}
}
}
@objc var isOptStringArraySet: Bool {
return demo.object(forKey: DemoKeys.optStringArray) != nil
}
@objc func removeOptStringArrayPref() {
demo.removeObject(forKey: DemoKeys.optStringArray)
}
@objc var arrayOfStringToAnyDictionary: [[String: Any]] {
get {
return demo.array(forKey: DemoKeys.arrayOfStringToAnyDictionary) as? [[String: Any]] ?? [[String: Any]]()
}
set {
demo.set(newValue, forKey: DemoKeys.arrayOfStringToAnyDictionary)
}
}
@objc var isArrayOfStringToAnyDictionarySet: Bool {
return demo.object(forKey: DemoKeys.arrayOfStringToAnyDictionary) != nil
}
@objc func removeArrayOfStringToAnyDictionaryPref() {
demo.removeObject(forKey: DemoKeys.arrayOfStringToAnyDictionary)
}
@objc var optArrayOfStringToAnyDictionary: [[String: Any]]? {
get {
return demo.array(forKey: DemoKeys.optArrayOfStringToAnyDictionary) as? [[String: Any]]
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optArrayOfStringToAnyDictionary)
} else {
demo.removeObject(forKey: DemoKeys.optArrayOfStringToAnyDictionary)
}
}
}
@objc var isOptArrayOfStringToAnyDictionarySet: Bool {
return demo.object(forKey: DemoKeys.optArrayOfStringToAnyDictionary) != nil
}
@objc func removeOptArrayOfStringToAnyDictionaryPref() {
demo.removeObject(forKey: DemoKeys.optArrayOfStringToAnyDictionary)
}
@objc var stringToAnyDictionary: [String: Any] {
get {
return demo.dictionary(forKey: DemoKeys.stringToAnyDictionary) ?? [String: Any]()
}
set {
demo.set(newValue, forKey: DemoKeys.stringToAnyDictionary)
}
}
@objc var isStringToAnyDictionarySet: Bool {
return demo.object(forKey: DemoKeys.stringToAnyDictionary) != nil
}
@objc func removeStringToAnyDictionaryPref() {
demo.removeObject(forKey: DemoKeys.stringToAnyDictionary)
}
@objc var optStringToAnyDictionary: [String: Any]? {
get {
return demo.dictionary(forKey: DemoKeys.optStringToAnyDictionary)
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optStringToAnyDictionary)
} else {
demo.removeObject(forKey: DemoKeys.optStringToAnyDictionary)
}
}
}
@objc var isOptStringToAnyDictionarySet: Bool {
return demo.object(forKey: DemoKeys.optStringToAnyDictionary) != nil
}
@objc func removeOptStringToAnyDictionaryPref() {
demo.removeObject(forKey: DemoKeys.optStringToAnyDictionary)
}
@objc var optUrlVar: URL? {
get {
return demo.url(forKey: DemoKeys.optUrlVar)
}
set {
if let newValue = newValue {
demo.set(newValue, forKey: DemoKeys.optUrlVar)
} else {
demo.removeObject(forKey: DemoKeys.optUrlVar)
}
}
}
@objc var isOptUrlVarSet: Bool {
return demo.object(forKey: DemoKeys.optUrlVar) != nil
}
@objc func removeOptUrlVarPref() {
demo.removeObject(forKey: DemoKeys.optUrlVar)
}
func demoRemoveAll() {
demo.removeObject(forKey: DemoKeys.boolVar)
demo.removeObject(forKey: DemoKeys.doubleVar)
demo.removeObject(forKey: DemoKeys.floatVar)
demo.removeObject(forKey: DemoKeys.intVar)
demo.removeObject(forKey: DemoKeys.optAny)
demo.removeObject(forKey: DemoKeys.optStringVar)
demo.removeObject(forKey: DemoKeys.stringVar)
demo.removeObject(forKey: DemoKeys.optDataVar)
demo.removeObject(forKey: DemoKeys.dataVar)
demo.removeObject(forKey: DemoKeys.optDateVar)
demo.removeObject(forKey: DemoKeys.dateVar)
demo.removeObject(forKey: DemoKeys.anyArray)
demo.removeObject(forKey: DemoKeys.boolArray)
demo.removeObject(forKey: DemoKeys.dateArray)
demo.removeObject(forKey: DemoKeys.doubleArray)
demo.removeObject(forKey: DemoKeys.floatArray)
demo.removeObject(forKey: DemoKeys.intArray)
demo.removeObject(forKey: DemoKeys.stringArray)
demo.removeObject(forKey: DemoKeys.optBoolArray)
demo.removeObject(forKey: DemoKeys.optDateArray)
demo.removeObject(forKey: DemoKeys.optDoubleArray)
demo.removeObject(forKey: DemoKeys.optFloatArray)
demo.removeObject(forKey: DemoKeys.optIntArray)
demo.removeObject(forKey: DemoKeys.optStringArray)
demo.removeObject(forKey: DemoKeys.arrayOfStringToAnyDictionary)
demo.removeObject(forKey: DemoKeys.optArrayOfStringToAnyDictionary)
demo.removeObject(forKey: DemoKeys.stringToAnyDictionary)
demo.removeObject(forKey: DemoKeys.optStringToAnyDictionary)
demo.removeObject(forKey: DemoKeys.optUrlVar)
}
// MARK: END demo ⬆⬆⬆ AUTO-GENERATED CODE - DO NOT EDIT ⬆⬆⬆
// ANYTHING HERE IS LEFT UNTOUCHED
// MARK: BEGIN extra,migrate ⬇⬇⬇ AUTO-GENERATED CODE - DO NOT EDIT ⬇⬇⬇
// extra:
var extra = UserDefaults.standard
enum ExtraKeys {
static let boolVar2 = "boolVar2"
static let doubleVar2 = "doubleVar2"
static let floatVar2 = "floatVar2"
static let intVar2 = "intVar2"
}
@objc var boolVar2: Bool {
get {
return extra.bool(forKey: ExtraKeys.boolVar2)
}
set {
extra.set(newValue, forKey: ExtraKeys.boolVar2)
}
}
@objc var isBoolVar2Set: Bool {
return extra.object(forKey: ExtraKeys.boolVar2) != nil
}
@objc func removeBoolVar2Pref() {
extra.removeObject(forKey: ExtraKeys.boolVar2)
}
@objc var doubleVar2: Double {
get {
return extra.double(forKey: ExtraKeys.doubleVar2)
}
set {
extra.set(newValue, forKey: ExtraKeys.doubleVar2)
}
}
@objc var isDoubleVar2Set: Bool {
return extra.object(forKey: ExtraKeys.doubleVar2) != nil
}
@objc func removeDoubleVar2Pref() {
extra.removeObject(forKey: ExtraKeys.doubleVar2)
}
@objc var floatVar2: Float {
get {
return extra.float(forKey: ExtraKeys.floatVar2)
}
set {
extra.set(newValue, forKey: ExtraKeys.floatVar2)
}
}
@objc var isFloatVar2Set: Bool {
return extra.object(forKey: ExtraKeys.floatVar2) != nil
}
@objc func removeFloatVar2Pref() {
extra.removeObject(forKey: ExtraKeys.floatVar2)
}
@objc var intVar2: Int {
get {
return extra.integer(forKey: ExtraKeys.intVar2)
}
set {
extra.set(newValue, forKey: ExtraKeys.intVar2)
}
}
@objc var isIntVar2Set: Bool {
return extra.object(forKey: ExtraKeys.intVar2) != nil
}
@objc func removeIntVar2Pref() {
extra.removeObject(forKey: ExtraKeys.intVar2)
}
func extraRemoveAll() {
extra.removeObject(forKey: ExtraKeys.boolVar2)
extra.removeObject(forKey: ExtraKeys.doubleVar2)
extra.removeObject(forKey: ExtraKeys.floatVar2)
extra.removeObject(forKey: ExtraKeys.intVar2)
}
// migrate:
func migrate() {
if let value = demo.object(forKey: DemoKeys.boolVar) {
extra.set(value, forKey: ExtraKeys.boolVar2)
demo.removeObject(forKey: DemoKeys.boolVar)
}
if let value = demo.object(forKey: DemoKeys.doubleVar) {
extra.set(value, forKey: ExtraKeys.doubleVar2)
demo.removeObject(forKey: DemoKeys.doubleVar)
}
if let value = demo.object(forKey: DemoKeys.floatVar) {
extra.set(value, forKey: ExtraKeys.floatVar2)
demo.removeObject(forKey: DemoKeys.floatVar)
}
if let value = demo.object(forKey: DemoKeys.intVar) {
extra.set(value, forKey: ExtraKeys.intVar2)
demo.removeObject(forKey: DemoKeys.intVar)
}
}
// MARK: END extra,migrate ⬆⬆⬆ AUTO-GENERATED CODE - DO NOT EDIT ⬆⬆⬆
}