0

In Xcode 7 Swift 2.0, my main view controller does not recognize a second view controller. All custom class names and storyboard IDs are set and I've also tried enabling the check beside class and tests under the target membership under the file inspector (tried checking just one and then checked both as well).

I'd really appreciate someone explaining step by step how to fix this? Thanks!

import UIKit

class ViewController: UIViewController
{
    @IBAction func buttonPressed(sender: AnyObject)
    {
        var controller: DiceViewController // Error with this line: Use of undeclared type 'DiceViewController'
    }
}

I realize there are other posts here on StackOverFlow that are similar but they don't discuss if the target membership enabling still doesn't resolve the problem.

Midhun MP
  • 103,496
  • 31
  • 153
  • 200
  • Have you actually created a custom class called DiceViewController, or did you just give it that name in the storyboard? Did you include said class in this file? – Cesar Oct 22 '15 at 18:16
  • New to Xcode here .. thanks! that solved it! – user5407665 Oct 24 '15 at 18:36

0 Answers0