Rejection: do not animate

I am working with SVWebViewController . When I submit the view controller here

SVModalWebViewController *webViewController = [[SVModalWebViewController alloc] initWithAddress:address]; webViewController.webDelegate = self; [self presentViewController:webViewController animated:YES completion:nil]; 

The view controller slides from below, as expected. However, when the view manager is rejected, the call

 [self dismissViewControllerAnimated:YES completion:nil]; 

The view controller simply disappears. Missing slide animation. Any thoughts?

EDIT It turns out that many presentation animations do not display correctly in the application. Some presses on the navigation controller do not move or extend (but some of them). They just appear.

+6
source share
3 answers
 [self dismissViewControllerAnimated:YES completion:NULL]; 

It should be in SVModalWebViewController, not SVWebViewController

EDIT . Instead of automatically switching to SVWebViewController, you should click:

 SVWebViewController *webViewController = [[SVWebViewController alloc] initWithAddress:@"http://google.com"]; [self.navigationController pushViewController:webViewController animated:YES]; 

And instead of quitting, you should:

 [self.navigationController popViewControllerAnimated:YES]; 
0
source

From SVWebViewController viewWillAppear: ::

SVWebViewController must be contained in the UINavigationController. If you are representing an SVWebViewController, use the SVModalWebViewController instead.

  • Is your main view controller contained in the navigation controller? If not, this can lead to other animation problems that you encounter.
  • Deviation should be from the displayed modalViewController .
0
source

It happens to me when the destination view controller loads a large image or background

0
source

Source: https://habr.com/ru/post/949386/


All Articles