0

Interactive dismissal of a modally presented view controller containing a MKMapView freezes the animation.

I do not share any code since the steps to reproduce the issue is very simple. You even do not need any code. You can reproduce via storyboard.

  1. Create a view controller, which contains only a navigation bar and a MKWebView.
  2. From another VC, modally present it.
  3. Then try to dismiss it interactively. You will see the dismiss animation freezes.

Here is screen recording as GIF

enter image description here:

I encounter the problem on iPhone 11. So the reason cannot be insufficient CPU / GPU.

Anyone encountered this before? Can you reproduce the issue as well? Any suggestions without making the presentation full screen? Thank you.

Arda Oğul Üçpınar
  • 881
  • 1
  • 14
  • 38
  • I notice that in your video the map does not move as you drag. The word Apple is stationary at the bottom. Why is that? – matt Jan 19 '20 at 02:56
  • Wow. Yes, I see that now. I have no idea. All the constraints are set correctly. – Arda Oğul Üçpınar Jan 19 '20 at 03:05
  • I checked, it moves. Apple maps logo and the "Legal" button is constrainted to stay visible whatever happens. While using google maps and apple maps, many devevelopers were adding extra height to hide these off boundary, so this is the apple's way to prevent this. – Arda Oğul Üçpınar Jan 19 '20 at 03:16
  • Ok so that was a red herring. — Are you sure there is no delegate method preventing the dismissal? Or that the view controller is not set as modal? Either of those would result in the behavior you show. – matt Jan 19 '20 at 03:22
  • Completely sure. The controller is very simple with 60 lines of code. Also, when I record the video, there was not even a single line of code; only one xib file and an empty class. – Arda Oğul Üçpınar Jan 19 '20 at 03:31
  • `Or that the view controller is not set as modal?` did not understand this – Arda Oğul Üçpınar Jan 19 '20 at 03:38
  • Can you post the example? It would be good if we were testing the same project. – matt Jan 19 '20 at 04:04
  • I did created a brand new project and couldn't reproduce the issue whatever I do :/ Possibly something wrong with my projects navigation bar etc. Will close the question now since it is not completely relevant with the issue. I should investigate much more deeper. Thanks for your concern and time. – Arda Oğul Üçpınar Jan 20 '20 at 05:59
  • You can't just drag a navigation bar into the scene like that with "not even a single line of code"; that is part of why I was suspicious. Perhaps you could narrow down your real project, removing everything until you are left with just the issue? – matt Jan 20 '20 at 06:18
  • No, nav bar etc is not a part of these code at all. The "presenting" view controller is a part of nav bar. It should not and cannot affect the completely different UI stack. – Arda Oğul Üçpınar Jan 20 '20 at 07:23
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/206261/discussion-between-arda-ogul-ucpinar-and-matt). – Arda Oğul Üçpınar Jan 20 '20 at 07:34

0 Answers0