title: call viewController func from model.swift
body: <p>I am trying to clean my <code>GameplayViewController</code> code by moving what can be moved to <code>CurrentData.swift</code>. What I had:<br />
  <code>GameplayViewController.swift</code>:</p>
  <pre><code>current = CurrentData.init(howManyRooms: rooms)
  
  for index in 0...current!.items.count-1 {
      if current!.firstLaunch {
          createItems(imageName: current!.items[index].imageName)
      }
  }
  </code></pre>
  <p>And it worked fine. Then I had an idea of moving the for-loop to <code>CurrentData.init</code> code:<br />
  <code>CurrentData.swift</code>:</p>
  <pre><code>init(howManyRooms: Int) {
      self.size = Int(ceil(sqrt(Double(howManyRooms))))
      
      for index in 0...items.count-1 {
          if self.firstLaunch {
              GameplayViewController.createItems(imageName: items[index].imageName)
          }
      }
  }
  </code></pre>
  <p>And I got this error: &quot;Instance member 'createItems' cannot be used on type 'GameplayViewController'; did you mean to use a value of this type instead?&quot;<br />
  Is there a worthy way to call <code>GameplayViewController</code> func from <code>CurrentData.swift</code>?<br />
  Here is the func itself:</p>
  <pre><code> public func createItems(imageName: String) {
          let imageNamePNG = &quot;\(imageName).png&quot;
          let itemImage = UIImage(named: imageNamePNG)
          let itemImageView = UIImageView(image: itemImage)
          if let freeSpace = self.freeSpace {
              itemImageView.frame = CGRect(
              x: Int.random(in: Int(freeSpace.minX) ... Int(freeSpace.maxX)),
              y: Int.random(in: Int(freeSpace.minY) ... Int(freeSpace.maxY)),
              width: 63, height: 63)
          }
          let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(imageTapped(tapGestureRecognizer:)))
          itemImageView.isUserInteractionEnabled = true
          itemImageView.addGestureRecognizer(tapGestureRecognizer)
          view.addSubview(itemImageView)
          current?.createdImages.append(itemImageView)
      }
  </code></pre>