Open YauheniYarotski opened 6 years ago
Тоже столкнулся с этой проблемой. Причина тому следующий код:
[[[UIAlertView alloc] initWithTitle:nil message:VKLocalizedString(@"ErrorWhilePosting") delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:VKLocalizedString(@"ErrorWhilePosting") preferredStyle:UIAlertControllerStyleAlert];
[self presentViewController:alert animated:YES completion:nil];
Можно добавить action
Та же проблема, если перед публикацией удалить приложение в https://vk.com/settings?act=apps.
Если во время отправки новости пропадет соединение, появлется сообщение об ошибке без каких либо кнопок для закрытия - т.е. блокирует полностью UI. СompletionHandler так же не вызывается. Вызываю диалог так: let vkAction = { [weak self] in let shareDialog = VKShareDialogController() shareDialog.shareLink = VKShareLink(title: "", link: url) shareDialog.text = "\n" + hashtag shareDialog.dismissAutomatically = true shareDialog.completionHandler = { result in self?.dismiss(animated: true, completion: nil) } if self?.presentedViewController != nil { self?.dismiss(animated: true, completion: nil) } self?.present(shareDialog, animated: true, completion: nil) } Скрин: