How can I get a button tap for a button which is located in a UIScrollView, but in its initially non-visible area?
Solved
Problem was that the content was visible within a non-clipped view - therefore not getting touches.
How can I get a button tap for a button which is located in a UIScrollView, but in its initially non-visible area?
Solved
Problem was that the content was visible within a non-clipped view - therefore not getting touches.
I think you should add an action (yourAction in the code below) to the UIButton.
programmatically:
[button addTarget:self action:@selector(yourAction:) forControlEvents:UIControlEventTouchUpInside];
-(void)yourAction:(id)sender{
// your code
}
With the gui builder you should connect your UIButton to an action defined as IBAction in your .h controller file:
-(IBAction)yourAction:(id)sender;