Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vkSdkShouldPresentViewController fix #4

Open
mkll opened this issue Jun 6, 2014 · 0 comments
Open

vkSdkShouldPresentViewController fix #4

mkll opened this issue Jun 6, 2014 · 0 comments

Comments

@mkll
Copy link

mkll commented Jun 6, 2014

В новых версиях VK SDK авторизация пользователя реализована через вызов UIWebView (раньше было перенаправление в Safari, потом обратно), поэтому стал вызываться метод

- (void)vkSdkShouldPresentViewController:(UIViewController *)controller
{
    [self.parent presentViewController:controller animated:YES completion:nil];
}

и в имеющемся виде он не работает, посколько в момент вызова модального контроллера на экране уже (еще) присутствует UIActivityViewController. Фиксится следующим образом:

- (void)vkSdkShouldPresentViewController:(UIViewController *)controller
{
    [self.parent dismissViewControllerAnimated:YES completion:^{
        [self.parent presentViewController:controller animated:YES completion:nil];
    }];
}

Pull request ради двух строчек оформлять не хочу. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant