Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use of undeclared type UIViewController

Tags:

xcode

ios

swift

I have not changed anything major in this swift file, yet for some reason when I went to run my app I got a new error stating "Use of undeclared type UIViewController" in the first line of my swift file. I have tried cleaning and checking the targets, but am unable to figure out the issue.

I am getting an errors on every line below, excluding the import statements

import Foundation
import FirebaseAuth
import FirebaseDatabase    

public class User: UIViewController {
        @IBOutlet weak var _Fname: UITextField!
        @IBOutlet weak var _Lname: UITextField!
        @IBOutlet weak var _Email: UITextField!
        @IBOutlet weak var _Password1: UITextField!
        @IBOutlet weak var _Password2: UITextField!

Please let me know if you have any thoughts on why this may be occurring. Thanks in advance!

like image 924
dgelinas21 Avatar asked Nov 29 '16 20:11

dgelinas21


1 Answers

You probably forgot to import UIKit on top of your file. Without UIKit imported, your object doesn't know what a UIViewController is.

like image 71
unniverzal Avatar answered Oct 09 '22 10:10

unniverzal