Fixed bug preventing ASIAuthenticationDialog from being dismissed #295

Merged
merged 1 commit into from Jan 13, 2012

Projects

None yet

3 participants

@gcox
Contributor
gcox commented Dec 1, 2011

In iOS 5, the ASIAuthenticationDialog could not be dismissed using either the Cancel button or automatically by successfully logging in.
The bug is due to a change in UIViewController in iOS 5. The class & instance "dismiss" methods are using [UIViewController parentViewController] which, as of iOS 5, no longer returns the presenting view controller. A new property called 'presentingViewController' was added in iOS 5 to make up for this.

Changed the class & instance dismiss methods to use the "presentingViewController" property if it is available (iOS 5+). If not, it falls back to the "parentViewController" property.

This bug was previously reported in issue #277. However, it was closed with no explanation by the user that created it.

@gcox gcox Fixed bug preventing ASIAuthenticationDialog from being dismissed
In iOS 5, the ASIAuthenticationDialog could not be dismissed using either the Cancel button or automatically by successfully logging in.
The bug is due to a change in UIViewController in iOS 5.  The class & instance "dismiss" methods are using [UIViewController parentViewController] which, as of iOS 5, no longer returns the presenting view controller.  A new property called 'presentingViewController' was added in iOS 5 to make up for this.

Changed the class & instance dismiss methods to use the "presentingViewController" property if it is available (iOS 5+).  If not, it falls back to the "parentViewController" property.
ba67fc8
@csdillard

Just wanted to add another voice in hopes of getting this fixed in the next official version...

The bug mentioned here (and in issue #277, which was incorrectly closed) is still present in version 1.8.1. And the fix mentioned here (using presentingViewController instead of parentViewController on iOS 5 and above) does indeed work.

@jogu
Collaborator
jogu commented Jan 13, 2012

Thanks for investigating this and submitting a fix!

@jogu jogu merged commit 9d07768 into pokeb:master Jan 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment