I am trying to make a UILabel that if I click I can edit it. I have a hidden textfield.
Per this answer: How to customize UILabel clickable
I tried the following:
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
tapInput = [[UIGestureRecognizer alloc] initWithTarget:self action:@selector(didTapLabel)];
[lblInput setUserInteractionEnabled:YES];
[lblInput addGestureRecognizer:tapInput];
}
-(void)didTapLabel
{
[txtHidden becomeFirstResponder];
}
But my break point inside didTapLabel is not firing. Everything is hooked up correctly on the storyboard.