我正在使用此插件http://plugins.krajee.com/file-input/plugin-events 当您按DELETE BUTTOM时,通过删除所有上载或预加载的文件来执行此事件 我需要一个类似的事件,但是当我删除上传或预载了DELETE ICON的单个文件时 我该怎么办?
class Spaceship {
var isUFO = false
var weapon:String
init(weapon:String) {
self.weapon = weapon
}
func printSomething() {
print("Test")
}
}
class UFO: Spaceship {
}
var a = Spaceship(weapon:"Laser")
a.printSomething() //OUTPUT: Test
var b = UFO(weapon:"")
//This runs, but I don't want to have to fill in parameters
b.printSomething() //OUTPUT: Test
var c = UFO() //Ultimately this is what I want to do
c.printSomething()
//OUTPUT: missing argument for parameter 'weapon' in call var c = UFO()