在我的iphone应用程序中,我使用MK MapView从不同的页面导航 . 但是当MKMapView控件在那时运行时,控件不再在应用程序中返回 . 所以我正在丢失应用程序流,我必须再次运行应用程序 .
/ * [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“http://maps.google.com/maps?q=category:Taxi=NSW=australia”]]; * /
上面的代码在应用程序中给我搜索字符串作为查询 . 并且能够将引脚点放在Map中 . 但是控件不会保留在应用程序中 .
如何再次在应用程序中设置controll并在加载Map后导航?
请提供任何代码片段或有用的链接,这将不胜感激 .
谢谢,
Mishal Shah
1 回答
我不确定你在问什么,但我会尽我所能:
如果您使用UURpplication的openURL:方法,您的应用程序将退出,这是预期的行为 .
您可能需要创建一个实现MKMapViewDelegate协议的UIViewController .
不幸的是,Apple提供的MapKit文档严重缺乏 - 但我认为这听起来像是你't really have a great understanding of how view controllers work. You should check out Apple' s View Controller Programming Guide