My button is as follows
- Created label1
- Created label2
- Created customView (
UIView
) - Added label1 and label2 on custom view
- Created myCustomButton(
UIButton
) - Added customView on myCustomButton
I have already done userInteractionEnable for custom_View, label1 and label2.
Then added
[myCustomButton addTarget:self action:@selector(OnButtonClick:) forControlEvents:UIControlEventTouchUpInside];
And
-(void)OnButtonClick:(UIButton *)sender
{
}
But above function is never called even when I touch the button. Any solution?