UITextField and UIButton are not clickable

Multi tool use
UITextField and UIButton are not clickable
I am implementing simple UI for URL checking. For this, I used textField and button objects.
When I run the program first time, textField and button will work fine but when I click on the done button on the keyboard then the keyboard is dismissed. Now I want to edit the textField and when I am trying to click on textField it is not clickable or not showing the keyboard. same thing happened to the button, next button is also not clickable.
Here is the code I wrote for the button action
- (IBAction)urlNextButtonAction:(id)sender {
[self.urlTextfield resignFirstResponder];
[SVProgressHUD showWithStatus:@"Verifying URL"];
[self URLValidationMethod];
}
Please check this video you will understand the problem very easily
This is the ViewController screenshot from storyboard
Button
the first time it is working, a second time onwards either textField working nor button is working
– Priyanka Patil
Jul 3 at 7:23
did you add a keyboard notification if yes can you please show the method that'll triggered for notification.
– dreamBegin
Jul 3 at 7:26
no, I did not added keyboard notification
– Priyanka Patil
Jul 3 at 7:31
Did you used
scrollView
there?– iPeter
Jul 3 at 7:32
scrollView
2 Answers
2
There could be several issue with this..
it would be helpful if you show what you have written in keyboardShouldReturn method.
It is working in iPhone or iPad even simulator except for iPod touch device and iPhone 5 simulator. If the issue with Textfield delegate then it is not working on other devices also.
– Priyanka Patil
Jul 3 at 7:31
then try to run it in iphone device instead of simulator, there you can get the exact result, simulator sometimes misbehave, I've also faced such issues with simulator.
– Syed faizan ali
Jul 3 at 7:51
it is working in iPhone 8 and iPad, it is not working in iPod touch device
– Priyanka Patil
Jul 3 at 7:53
No, run it in real iphone device not simulator one
– Syed faizan ali
Jul 3 at 7:54
it is working in real iPhone device but not working in iPod touch device
– Priyanka Patil
Jul 3 at 7:55
It seems like the problem is with the SVProgressHud
. You should remove it as soon as you task is completed by calling [SVProgressHud dismiss]
or else it will block the UI
.
SVProgressHud
[SVProgressHud dismiss]
UI
I removed SVProgressHud, but still same issue
– Priyanka Patil
Jul 3 at 7:36
Show the
storyboard
design of the ViewController
please!– iPeter
Jul 3 at 7:37
storyboard
ViewController
check the updated question
– Priyanka Patil
Jul 3 at 7:46
Is there any subviews which holds your textfield and button?
– iPeter
Jul 3 at 7:50
yes, companyURL
– Priyanka Patil
Jul 3 at 7:50
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Can you show the code for the
Button
's click event?– iPeter
Jul 3 at 7:20