質問編集履歴
3
訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -65,3 +65,5 @@
|
|
65
65
|
|
66
66
|
|
67
67
|
ちょっと考えてみたところ、なんでこんなのIndexPathのエクステンションで書き始めたんだろう…???
|
68
|
+
|
69
|
+
IndexPathのエクステンション以外で書けば、問題自体がなくなるような。
|
2
訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -61,3 +61,7 @@
|
|
61
61
|
コード
|
62
62
|
|
63
63
|
```
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
ちょっと考えてみたところ、なんでこんなのIndexPathのエクステンションで書き始めたんだろう…???
|
1
訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,31 +18,41 @@
|
|
18
18
|
|
19
19
|
```swift
|
20
20
|
|
21
|
+
import Foundation
|
22
|
+
|
21
23
|
|
22
24
|
|
23
25
|
extension IndexPath {
|
24
26
|
|
25
27
|
|
26
28
|
|
27
|
-
func createRange(start: IndexPath, end: IndexPath) -> [IndexPath] {
|
29
|
+
func createRange(start: IndexPath, end: IndexPath) -> [IndexPath] {
|
28
30
|
|
29
31
|
|
30
32
|
|
31
|
-
let s = min(start, end)
|
33
|
+
let s = min(start, end)
|
32
34
|
|
33
|
-
// Use of 'min' refers to instance method 'min()' rather than global function 'min' in module 'Swift'
|
35
|
+
// Use of 'min' refers to instance method 'min()' rather than global function 'min' in module 'Swift'
|
34
36
|
|
35
|
-
// Use 'Swift.' to reference the global function in module 'Swift'
|
37
|
+
// Use 'Swift.' to reference the global function in module 'Swift'
|
36
|
-
|
37
|
-
let e = max(start, end)
|
38
|
-
|
39
|
-
// Use of 'min' refers to instance method 'min()' rather than global function 'min' in module 'Swift'
|
40
|
-
|
41
|
-
// Use 'Swift.' to reference the global function in module 'Swift'
|
42
38
|
|
43
39
|
|
44
40
|
|
41
|
+
// let s = Swift.min(start, end) // これでエラーがでなくなる。
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
let e = max(start, end)
|
46
|
+
|
47
|
+
// Use of 'min' refers to instance method 'min()' rather than global function 'min' in module 'Swift'
|
48
|
+
|
49
|
+
// Use 'Swift.' to reference the global function in module 'Swift'
|
50
|
+
|
51
|
+
|
52
|
+
|
45
|
-
// (略)
|
53
|
+
// (略)
|
54
|
+
|
55
|
+
}
|
46
56
|
|
47
57
|
}
|
48
58
|
|