ASIAuthenticationDialog on iOS5 #277

Closed
favormm opened this Issue Oct 20, 2011 · 3 comments

Comments

Projects
None yet
3 participants
@favormm

favormm commented Oct 20, 2011

Today, I have update my xcode to 4.2 version. I find thd ASIAuthenticationDialog can't dismiss even if I click the cancle or login button.

Any one meet this problem? And how to solve it?

@favormm

This comment has been minimized.

Show comment Hide comment
@favormm

favormm Oct 21, 2011

I know the reason, that the iOS5 sdk parentViewController return nil, should change to preventingViewController

favormm commented Oct 21, 2011

I know the reason, that the iOS5 sdk parentViewController return nil, should change to preventingViewController

@favormm favormm closed this Oct 21, 2011

@pthompson

This comment has been minimized.

Show comment Hide comment
@pthompson

pthompson Oct 26, 2011

I didn't see an update in the code. Maybe it hasn't been merged yet?

To get it to work, I changed parentViewController to the presentingController property in the dismiss methods:

  • (void)dismiss
    {
    [[sharedDialog presentingController] dismissModalViewControllerAnimated:YES];
    }
  • (void)dismiss
    {
    if (self == sharedDialog) {
    [[self class] dismiss];
    } else {
    [[self presentingController] dismissModalViewControllerAnimated:YES];
    }
    }

I didn't see an update in the code. Maybe it hasn't been merged yet?

To get it to work, I changed parentViewController to the presentingController property in the dismiss methods:

  • (void)dismiss
    {
    [[sharedDialog presentingController] dismissModalViewControllerAnimated:YES];
    }
  • (void)dismiss
    {
    if (self == sharedDialog) {
    [[self class] dismiss];
    } else {
    [[self presentingController] dismissModalViewControllerAnimated:YES];
    }
    }
@csdillard

This comment has been minimized.

Show comment Hide comment
@csdillard

csdillard Jan 11, 2012

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

This issue seems to have been incorrectly closed. It is still present in version 1.8.1. And the fix mentioned above by pthompson and by gcox in #295 (using presentingViewController instead of parentViewController on iOS 5 and above) does indeed work.

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

This issue seems to have been incorrectly closed. It is still present in version 1.8.1. And the fix mentioned above by pthompson and by gcox in #295 (using presentingViewController instead of parentViewController on iOS 5 and above) does indeed work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment