更新之前,重写 init 方法前面不用加关键字,beta5 出来后,如果父类 init 方法前有加 required 那么子类也要加 required ,父类没有加,子类在重写的时候需要加 override 。
在重写 UITableViewCell 子类的时候,遇到这个问题,暂时没找到解决方法,不重写不报错,重写 init 会有这个错误提示,但是没找到 UITableViewCell 的 required members 是哪个,还是要实现什么东西。父类的 init 方法没有 required 关键字,所以子类理应是不用加的,加了还是一样报错。各位最近研究 swift 的,有遇到这个情况吗。
Class '' does not implement its superclass's required members