百度地图导航算路成功但无法进入导航页面Warning: Attempt to present ... whose view is not in the window hierarchy!

百度地图导航算路成功但是无法进入导航页面Warning: Attempt to presentonwhose view is not in the window hierarchy!

我又做了一个导航的demo

把所有东西都写到一个 button点击事件里面

无论是在导航控制器中还是tabBar中

都可以用

但是一旦添加到有对个控制器的项目里就会出现:

Warning: Attempt to presentonwhose view is not in the window hierarchy!,从而无法导航了,无论是push还是dismiss到导航的界面都不行。

只需要在:

导航页面.m中增加

-(id)naviPresentedViewController {

return self;

}

就可以了


百度地图导航算路成功但无法进入导航页面Warning: Attempt to present ... whose view is not in the window hierarchy!_第1张图片

你可能感兴趣的:(百度地图导航算路成功但无法进入导航页面Warning: Attempt to present ... whose view is not in the window hierarchy!)