I have a login method that connects to a server to check the user info when the user clicks on the login button.
How can i block the view showing an activity indicator so that the user does not click on the button again?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why don’t you just set the
userInteractionEnabledto false for the button?and set it back to YES after the login is completed?
You can set this property to every responsive UI element in the view you wish to disable.
BTW
This off-curse dose not prevent you from showing an activity indicator.
As always I love to recommend MBProgressHUD
EDIT
If you are getting ARC errors do this:
-fno-objc-arcin the Compiler Flags of the MBProgressHud.m file.This will flash xCode not to compile this file with ARC.