when create a instance of UIController or its subclass, we use addTarget to connect the target with a action just as belows
let btn = UIButton.init(type: .custom)
btn.frame = CGRect.init(x: 100, y: 200, width: 80, height: 44)
btn.setTitle("test", for: .normal)
btn.addTarget(self, action: #selector(self.test(sender:)), for: .touchUpInside)
self.view.addSubview(btn)
so, btn.addTarget(self,...)" what does "self" mean? By swift syntax, it seems to be the class instance who call this method. But I think it should be the button instance?
who can help me? thanks a lot.