File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 28
28
- (void )didReceiveOAuthIOCode : (NSString *)code ;
29
29
- (void )didAuthenticateServerSide : (NSString *)body andResponse : (NSURLResponse *) response ;
30
30
- (void )didFailAuthenticationServerSide : (NSString *)body andResponse : (NSURLResponse *)response andError : (NSError *)error ;
31
+ - (void )didDismissModalDialog ;
31
32
@end
32
33
33
34
@interface OAuthIOModal : UIViewController <UIWebViewDelegate>
Original file line number Diff line number Diff line change @@ -396,6 +396,7 @@ - (void)showWithProvider:(NSString *)provider options:(NSDictionary*)options
396
396
[[NSUserDefaults standardUserDefaults ] synchronize ];
397
397
}
398
398
[_rootViewController presentViewController: self animated: YES completion: ^{
399
+
399
400
[_browser loadRequest: url];
400
401
}];
401
402
}
@@ -442,7 +443,11 @@ - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)
442
443
{
443
444
if ([url.scheme isEqual: @" oauthio" ] && [url.host isEqual: @" localhost" ])
444
445
{
445
- [self dismissViewControllerAnimated: YES completion: nil ];
446
+ [self dismissViewControllerAnimated: YES completion: ^(){
447
+ if ([self .delegate respondsToSelector: @selector (didDismissModalDialog )]) {
448
+ [self .delegate didDismissModalDialog ];
449
+ }
450
+ }];
446
451
[self getTokens: [url absoluteString ]];
447
452
return (NO );
448
453
}
You can’t perform that action at this time.
0 commit comments