It looks like you are not setting the target to send the message to. So in the code add:
[myPopUpButton setTarget:self]
assuming the popUpAction:
method is in the same class.
When you use Interface Builder, it connects the selector action to the target.
From the documentation for this call:
- (void)setTarget:(id)anObject
If anObject is nil
, but the control still has a valid action message, the application follows the responder chain, looking for an object that can respond to the message.
In your case, there is no object responding to the message.
source share