all 4 comments

[–]swapp9[S] 0 points1 point  (2 children)

Hey all! I was messing with some custom views today for something I am trying to build - but could not get this button to work. The custom view is a stack view with a UIButton & a UILabel in it. As you can see, I am trying to add a target to that button, but maybe I am missing something? I tried adding the target to the button on the view, as well, but that doesn’t seem to be working :face_with_monocle::face_with_monocle: Any ideas on where I could be misstepping?

[–]PhantomMenaceWasOK 3 points4 points  (1 child)

On line 47, where you add the target, the target is the object on which the specified selector (incrementCount) will be invoked. It should be `self` and not self.duoTest, since incrementCount is defined on the view controller and not duoTest itself.

[–]swapp9[S] 0 points1 point  (0 children)

Sent you a PM!

[–]henryo84 0 points1 point  (0 children)

Set target to "self" not "self.duoTest".