Using an Undeclared UIViewController Type

I did not change anything serious about this fast file, but for some reason, when I went to start my application, I got a new error indicating "Use of an undeclared type of UIViewController" in the first line of my quick file. I tried to clear and check the goals, but I can not understand the problem.

I get errors in each line below, except for 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 thoughts on why this might happen. Thanks in advance!

+5
source share
1 answer

You probably forgot import UIKit on top of your file. Without UIKit import UIKit your object does not know what UIViewController .

+20
source

Source: https://habr.com/ru/post/1260542/


All Articles