Merge pull request #295 from gcox/master
Fixed bug preventing ASIAuthenticationDialog from being dismissed on iOS5
Showing
1 changed file
with
6 additions
and
0 deletions
| @@ -216,6 +216,9 @@ static const NSUInteger kDomainSection = 1; | @@ -216,6 +216,9 @@ static const NSUInteger kDomainSection = 1; | ||
| 216 | 216 | ||
| 217 | + (void)dismiss | 217 | + (void)dismiss |
| 218 | { | 218 | { |
| 219 | + if ([sharedDialog respondsToSelector:@selector(presentingViewController)]) | ||
| 220 | + [[sharedDialog presentingViewController] dismissModalViewControllerAnimated:YES]; | ||
| 221 | + else | ||
| 219 | [[sharedDialog parentViewController] dismissModalViewControllerAnimated:YES]; | 222 | [[sharedDialog parentViewController] dismissModalViewControllerAnimated:YES]; |
| 220 | } | 223 | } |
| 221 | 224 | ||
| @@ -233,6 +236,9 @@ static const NSUInteger kDomainSection = 1; | @@ -233,6 +236,9 @@ static const NSUInteger kDomainSection = 1; | ||
| 233 | if (self == sharedDialog) { | 236 | if (self == sharedDialog) { |
| 234 | [[self class] dismiss]; | 237 | [[self class] dismiss]; |
| 235 | } else { | 238 | } else { |
| 239 | + if ([self respondsToSelector:@selector(presentingViewController)]) | ||
| 240 | + [[self presentingViewController] dismissModalViewControllerAnimated:YES]; | ||
| 241 | + else | ||
| 236 | [[self parentViewController] dismissModalViewControllerAnimated:YES]; | 242 | [[self parentViewController] dismissModalViewControllerAnimated:YES]; |
| 237 | } | 243 | } |
| 238 | } | 244 | } |
-
Please register or login to post a comment