Junior — Senior
Is this record correct in Swift
livecode
Task condition
In the example below, a subclass of UIView is created. In the constructor, the method addTarget is called with the current object and a selector, where the argument is the number 1. It is necessary to determine whether such code compiles and whether it complies with the rules of using #selector in Swift.
class View: UIView {
init() {
self.addTarget(for: self, #selector(foo: 1))
}
}