parse.com - Detect Facebook login failure -
i'm using pfloginviewcontroller
subclass in app allow users login facebook works great, if user changes mind , denies app access facebook account, login stops working(as expected) loading indicator spins. never receive error telling me couldn't login, it's infinite loop.
any idea how detect failure , stop ui displaying loading indicator?
code below, straight subclassing visual tweaks.
- (void)viewdidload { [super viewdidload]; // customize default parse login view [self setupui]; } - (void)setupui { [self.loginview setbackgroundcolor:[uicolor colorwithpatternimage:[uiimage imagenamed:@"bg"]]]; [self.loginview setlogo:[[uiimageview alloc] initwithimage:[uiimage imagenamed:@"fdbk_logo"]]]; // set buttons appearance [self.loginview.facebookbutton setimage:nil forstate:uicontrolstatenormal]; [self.loginview.facebookbutton setimage:nil forstate:uicontrolstatehighlighted]; [self.loginview.facebookbutton setbackgroundimage:[uiimage imagenamed:@"fb_login_btn"] forstate:uicontrolstatenormal]; [self.loginview.facebookbutton settitle:@"" forstate:uicontrolstatenormal]; [self.loginview.facebookbutton settitle:@"" forstate:uicontrolstatehighlighted]; }
this isn't solution looking opinion:
i love parse stopped using built in controllers while ago (pflogin / signup, pfquerytableview etc) because whilst provide decent out-the-box functionality, they're bit incomplete use in production app. there many scenarios provide 90% of want (as in case now) , whilst save time compared rolling own, once make own have can customise want , re-use in future!
Comments
Post a Comment