[Solved] Can’t see the button


Simple remove self.myView.hidden = YES;

To add you click listener, two solution:

By code in your viewDidLoad:

- (void)viewDidLoad {
     [super viewDidLoad];
     [mybutton addTarget:self action:@selector(myButtonClick:) forControlEvents:(UIControlEvents)UIControlEventTouchDown];
}

-  (void)myButtonClick:(id)sender {
    myButton.hidden = YES;
}

Or via interface Builder (preferred), The easiest way is to actually define the handler/action in Xcode using the IBAction declaration in the interface file (add the declaration just before the @end statement). Then attach the action to the button

2

solved Can’t see the button