简体   繁体   English

mapViewWillStartLoadingMap方法没有第二次调用Swift

[英]mapViewWillStartLoadingMap method does not called second time Swift

I am using Map Kit View. 我正在使用Map Kit View。 mapViewWillStartLoadingMap method called when I navigate MapViewController first time. 我第一次浏览MapViewController时调用的mapViewWillStartLoadingMap方法。 Then I go back previous controller and again navigate MapViewController , mapViewWillStartLoadingMap not called. 然后,我返回上一个控制器,然后再次导航MapViewController,未调用mapViewWillStartLoadingMap。 Where is my mistake ? 我的错误在哪里?

I am using this method go to previous controller from MapViewController 我正在使用此方法从MapViewController转到先前的控制器

dismissViewControllerAnimated(true, completion: nil)

Check that your ViewController containing the map is being deInitialised. 检查包含地图的ViewController是否已取消初始化。

Add this to your VC and set a breakpoint on it. 将此添加到您的VC,并在其上设置一个断点。

deinit {

}

If its not that, check the delegate for the map view is set correctly when your map VC is on active. 如果不是,请在地图VC处于活动状态时检查是否正确设置了地图视图的委托。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM