So I have a uiscrollview with a form of textfields. I'm trying to add an action to the background so that when the user taps on the background the keyboard retracts.
I was able to get the backgroundTap to retract the keyboard, but it disabled my uibuttons: Detecting hits in UIScrollView while still letting it do it's thing
As stated in the second answer I added this code to the viewDidLoad:
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backgroundTap:)];
[scrollView addGestureRecognizer: singleTap];
Where backgroundTap is
- (IBAction)backgroundTap:(id)sender
That allowed me retract the keyboard with a backgroundTap on uiscrollview, however it disabled my cancelButton that closes the modal view of the form and also the submitButton which sends out a HTTP Post.
Any ideas why it's disabling the uibuttons?