小编Dan*_*son的帖子

Swift 4.1 - 子类UIImage

我得到的Overriding non-@objc declarations from extensions is not supported错误,当升级到4.1雨燕后子类UIImage的自定义的init

class Foo: UIImage {

    init(bar: String) { }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    // Overriding non-@objc declarations from extensions is not supported
    required convenience init(imageLiteralResourceName name: String) {
        fatalError("init(imageLiteralResourceName:) has not been implemented")
    }
}
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助

uiimage swift swift4.1

6
推荐指数
1
解决办法
716
查看次数

标签 统计

swift ×1

swift4.1 ×1

uiimage ×1