質問するログイン新規登録

質問編集履歴

1

コードを追記しました

2017/10/25 06:54

投稿

maru.wk
maru.wk

スコア30

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
+ 初心者なもので、何かと伝わりづらいと思いますがよろしくお願い申し上げます。