Continuing to learn Objective-C and building the structure correctly.
I have an iOS application with a UIViewController that has a specific method called "doSomething". In my opinion, the controller has a view and in this view there are several UIButton that I create programmatically (see the example with one button below).

Now, when I click the button, I want to call my "doSomething" method. The way I am doing this now is as follows:
[myButton addTarget:nil
action:@selector(doSomething:)
forControlEvents:UIControlEventTouchUpInside];
Since my goal is zero, it goes up the defendant chain until it finds the "doSomething" method. It works, but in fact it does not feel good.
@protocol, . , . , , , .
?
!