When the landing is done manually, Mbprogresshud message:@ "successful Landing"
And then Dispatch_after call Mbprogresshud Hidehud hidden can be successful.
The problem came, wrote the automatic login, nsuserdefaults configuration, and then [self login] login, can push the next controller, but the successful landing of the mask has been, will not be canceled. In the "Mbprogresshud Hidehud" method there to break points, still. Why is this?
Landing success the alert has been
Manual login Code No problem automatic login login successful after the cover cancel not lost login to the homepage has always been the Chrysanthemum interface ...
If you put the hidden method outside the dispatch is no problem.
The first time you run, turn on the automatic login switch, ShowMessage normal display for 1 seconds and then disappear. The second run, preference storage of the status of automatic login, directly logged in, and then the problem, login successfully jump to the next controller, ShowMessage did not disappear
1 //Login Verification Manual Connection Login2contac2-(ibaction) Loginsclick {3 //Login Failure Use official, self-written, third-party framework prompts the user not to apply the box warning4 if(! [Self.accounField.text isequaltostring:@"DJ"]) {5[Mbprogresshud ShowError:@"user name does not exist! "];6 return;7 }8 //Online verification of account data9 if(! [Self.pwdField.text isequaltostring:@"123"]) {Ten[Mbprogresshud showsuccess:@"Wrong password! "]; One return; A } - //Add (Mask) cover screen -[Mbprogresshud ShowMessage:@"Program Ape is desperately loading data ..."]; the //send a network request - - //analog Networking Fetch Data delay 1 sec dispatch_after snippet-gcd -Dispatch_after (Dispatch_time (Dispatch_time_now, (int64_t) (1.0* nsec_per_sec)), Dispatch_get_main_queue (), ^{ + //Remove Masks - //[Mbprogresshud Hidehud]; +[Self Performseguewithidentifier:@"Login2contac"Sender:nil];//Manual Jump A //Save personal preferences for next automatic login atNsuserdefaults *defaults =[Nsuserdefaults standarduserdefaults]; - [Defaults setObject:self.accounField.text forkey:djaccount]; - [Defaults setObject:self.pwdField.text forkey:djpwd]; - [Defaults setBool:self.rememberPwd.isOn forkey:djrementpwd]; - [Defaults setBool:self.automaticPwd.isOn forkey:djautologin]; - [Defaults synchronize]; in }); - //cover has always been there only to remove masks here to [Mbprogresshud Hidehud]; +}
Automatic Login Login Successful The alert mask has been bug