一切都很好,直到突然我无法在 xcode 上向 UITextfield
添加操作, Storyboard上 View Controller 的类名 == View Controller 的代码,向 UIButton 添加操作没有问题,但是 UITextField ctrl 拖动到代码时没有操作选项:((
我想知道到底发生了什么
最佳答案
好的,找到问题了,
我使用了 SwiftValidator,这个:https://github.com/jpotts18/SwiftValidator/blob/43fddfb3851b8edc3b26ec0d49404fa445963483/SwiftValidator/Core/Validatable.swift
该扩展以某种方式搞砸了 XCode,我无法在界面生成器上为 UITextFIeld 添加 IBAction。
类似的问题,但在 UIButton 上:Can't connect IBAction in Xcode
关于swift - 无法在 UITextfield 上添加操作以查看 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40715672/