Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoid multiple web service call in ios

I am inserting data to server database from my app. on submit button I am calling inserdata web services. My data inserted in database. but I have one problem, before I get first result back when I tap on submit button again then same record inserted multiple times in database.

Please help how can I avoid this. (also by mistake I have tapped multiple times on submit button then same record inserted multiple time).

like image 333
Vinod Jadhav Avatar asked Feb 23 '26 00:02

Vinod Jadhav


1 Answers

when web service triggers first time.... set button.selected = yes and in function check if button isSelected then not perform action. Use this bool value to distinguish between both conditions.

like image 125
Divyanshu Sharma Avatar answered Feb 25 '26 13:02

Divyanshu Sharma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!