I am using UIAlertView to get user input. I want to add validation on user entered value. When a user enters the invalid value I want to show the response on same UIAlertView by changing alert message only without loading UIAlertView again. I don't want to show pop up again everything will be on the same Popup only.
Asked
Active
Viewed 51 times
0
-
Please add your code. – Sneha Apr 12 '17 at 10:07
-
2You actually want to prevent the AlertView from closing, when user triggers an action. (By the way UIAlertView was deprecated. Better use UIAlertController). Anyway, this is a possible duplicate : http://stackoverflow.com/questions/25628000/prevent-dismissal-of-uialertcontroller – Ethan Halprin Apr 12 '17 at 10:14
-
Possible duplicate of [Prevent dismissal of UIAlertController](http://stackoverflow.com/questions/25628000/prevent-dismissal-of-uialertcontroller) – Sneha Apr 12 '17 at 11:13
-
1Sorry I can't give a proper code for you problem but I can give you a logic for your problem. When you show input field in UIAlertView then you can get input Field reference by using UIAlertViewDelegates and you can textFieldChangeEvent in that inputField. From there you can validate the entered text. Hopefully you might get an idea how to solve it. – Usman Javed Apr 13 '17 at 06:19