Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的项目中,我有许多 UIView 的子类。
其中一些我覆盖了 init() 方法
// Worked in Swift 1.1 override init() { super.init() }
现在我得到这个错误:
初始化器不会覆盖其超类中的指定初始化器
从错误消息看来,Apple 决定从 UIView 中删除 init() 方法......但我仍然可以创建一个新的 UIView 但正在做
let view = UIView()