Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed bug preventing ASIAuthenticationDialog from being dismissed #295

Merged
merged 1 commit into from Jan 13, 2012

Conversation

Projects
None yet
3 participants
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.

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.

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.

Collaborator

jogu commented Jan 13, 2012

Thanks for investigating this and submitting a fix!

jogu added a commit that referenced this pull request Jan 13, 2012

Merge pull request #295 from gcox/master
Fixed bug preventing ASIAuthenticationDialog from being dismissed on iOS5

@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