Swift 4.1 : "self used method call 'defaultConfiguration' before 'super.init' call"
Swift 4.1 : "self used method call 'defaultConfiguration' before 'super.init' call"
我正在尝试在我的项目中集成一个库,这里是 link 到 github https://github.com/rinov/YoutubeKit/tree/0.1.2
但是我在这两种方法中遇到了这个错误 "self used method call 'defaultConfiguration' before 'super.init' call"
public init(frame: CGRect = .zero, playerVars: [String: AnyObject]) {
super.init(frame: frame, configuration: defaultConfiguration())
commonInit()
self.playerVars = playerVars
}
public init(frame: CGRect = .zero, playerVars: [VideoEmbedParameter] = []) {
super.init(frame: frame, configuration: defaultConfiguration())
commonInit()
guard !playerVars.isEmpty else { return }
var params: [String: AnyObject] = [:]
playerVars.forEach {
let property = [=12=].property
params[property.key] = property.value
}
self.playerVars = params
}
有什么帮助吗??
我正在尝试在我的项目中集成一个库,这里是 link 到 github https://github.com/rinov/YoutubeKit/tree/0.1.2
但是我在这两种方法中遇到了这个错误 "self used method call 'defaultConfiguration' before 'super.init' call"
public init(frame: CGRect = .zero, playerVars: [String: AnyObject]) {
super.init(frame: frame, configuration: defaultConfiguration())
commonInit()
self.playerVars = playerVars
}
public init(frame: CGRect = .zero, playerVars: [VideoEmbedParameter] = []) {
super.init(frame: frame, configuration: defaultConfiguration())
commonInit()
guard !playerVars.isEmpty else { return }
var params: [String: AnyObject] = [:]
playerVars.forEach {
let property = [=12=].property
params[property.key] = property.value
}
self.playerVars = params
}
有什么帮助吗??