I'm using a subclass of the PFLogInViewController in which I want to display errors in a different way to that of the default behaviour which is to pop up a UIAlertView.
Does anyone know if there's a way to avoid showing the UIAlertView? I'm already using the following method, however that doesn't actually allow me to avoid the UIAlertView being shown in the event of a failed login.
- (BOOL)logInViewController:(PFLogInViewController *)logInController shouldBeginLogInWithUsername:(NSString *)username password:(NSString *)password
PFLogInViewControllerdoes not provide hooks to change this behavior. You might want to build your own customPFLogInViewControllersubclass and override the method which display alert view when login failed.Since PFLogInViewController's code has been open sourced, according to it the method which displays an alert view is
_loginDidFailWithError.https://github.com/ParsePlatform/ParseUI-iOS/blob/master/ParseUI/Classes/LogInViewController/PFLogInViewController.m#L382-L390
For example, if you like the following, you can not to display alerts when the login fails. Define
MYLogInViewControlleras subclass ofPFLogInViewControllerand use it instead
PFLogInViewController