【发布时间】:2016-02-09 03:57:37
【问题描述】:
我尝试在我的 Main.Storyboard 上添加一个插座,然后 CTRL + 将它拖到我相应的视图控制器中。
class LoginViewController: UIViewController {
@IBOutlet weak var nameField: UITextField!
}
执行此操作时,我收到此错误
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7f7ff051e860> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key nameField.'
什么可能导致这个问题?
【问题讨论】:
标签: ios swift uitextfield iboutlet