回答編集履歴
2
追記
test
CHANGED
@@ -21,3 +21,27 @@
|
|
21
21
|
let activities: [Activity] //上で作った型の配列を作る
|
22
22
|
|
23
23
|
```
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
N番目の配列を消去するなら
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
```swift
|
32
|
+
|
33
|
+
activities.enumerated().filter{$0.offset != n}
|
34
|
+
|
35
|
+
```
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
並び替えは
|
40
|
+
|
41
|
+
```swift
|
42
|
+
|
43
|
+
activities.sort(by: {$0.timestamp < $1.timestamp})
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
かな。
|
1
追記
test
CHANGED
File without changes
|