why does it give an error, it is impossible to call 'performSelector' with a list of arguments of type '(Selector)'?

30 Views Asked by At

now I'm studying swift 4.2 and trying to redo the code from swift 3 to 4. I get an error in the circleCompleted() and touchFailed() functions

private func circleCompleted() {
        endTouching()
        if dissappear_on_completion { self.removeFromSuperview() }
        if completed_selector != nil && completed_target != nil { completed_target!.performSelector(completed_selector!) }
    }
    
    private func touchFailed() {
        endTouching()
        if failed_selector != nil && failed_target != nil { failed_target!.performSelector(failed_selector!) }
    }
    
    private func touchMoved(rad: CGFloat) {
        if moved_target != nil && moved_selector != nil { moved_target!.performSelector(inBackground: moved_selector!, with: (rad as AnyObject)) }
    }

I'm a beginner and I haven't been able to figure out this problem myself yet

0

There are 0 best solutions below