Custom UIView: UIButton addTarget not called
问题 My problem is that I have a custom UIView, which is representing a popup. Inside this view I want to have a slider, which has a label that gets updated every time I drag the slider around. The slider logic works, at least when I'm using it in a ViewController directly, but not with with my custom view. Specifically, the method specified in addTarget doesn't get called at all. I also tried setting the backgroundColor of the slider to something, and it actually showed up, meaning it has a frame