質問編集履歴
1
コードを追記しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,11 +5,23 @@
|
|
5
5
|
```
|
6
6
|
```swift
|
7
7
|
for y in 0..<Yheight{
|
8
|
-
|
8
|
+
for x in 0..<Xwidth {
|
9
|
+
let array = getPixelColorFromUIImage(myUIImage: image!, pos: CGPoint(x:x,y: y))
|
9
|
-
}
|
10
|
+
}
|
11
|
+
}
|
10
12
|
```
|
11
13
|
ここで、
|
12
14
|
Binary operator '..<' cannot be applied to operands of type 'Int' and 'ViewController.productY'
|
13
15
|
というエラーが発生します。
|
14
16
|
|
17
|
+
なお、productYはこのようにしています。
|
18
|
+
```swift
|
15
|
-
|
19
|
+
class productY {
|
20
|
+
var yheight:Int
|
21
|
+
init(yheight:Int) {
|
22
|
+
self.yheight = yheight
|
23
|
+
}
|
24
|
+
}
|
25
|
+
```
|
26
|
+
|
27
|
+
初心者なもので、何かと伝わりづらいと思いますがよろしくお願い申し上げます。
|