2

In previous iOS versions, using the Twitter functionality (with bit.ly) Works perfect. However, when I click submit to twitter, it posts, but doesn't remove the dialog. It sounds similar to this bug (in fact the cancel button doesn't work either):

https://github.com/ideashower/ShareKit/issues/254

I tried the solution listed, but it doesn't work. Any ideas?

Thanks!

Graeme
  • 1,107
  • 2
  • 12
  • 30

2 Answers2

5

I got an answer on the actual bug

"Now that the NDA is lifted, I just changed the two instances of [[currentView parentViewController] dismissModalViewControllerAnimated:YES] in SHK.m to [currentView dismissModalViewControllerAnimated:YES].

This gist is my SHK.m: https://gist.github.com/1281191"

Graeme
  • 1,107
  • 2
  • 12
  • 30
  • `if ([currentView parentViewController] != nil)` also has to change to `if (currentView != nil)` like in itruf's answer. – Protocole Feb 07 '12 at 06:45
4

I've changed code in function hideCurrentViewControllerAnimated and it works perfect.

My code:

- (void)hideCurrentViewControllerAnimated:(BOOL)animated
{
    if (isDismissingView)
        return;

    if (currentView != nil)
    {
        self.isDismissingView = YES;
        [currentView dismissModalViewControllerAnimated:YES];
        NSLog(@"dismiss");
    }
}
werbary
  • 1,105
  • 2
  • 14
  • 43