我在 iOS 8 中显示 MKMapView 时遇到问题。
它在 iOS 7 中运行良好,现在也运行良好,但仅限于模拟器。
在设备上,它仅显示注释,但后面不显示地图。
它看起来像这样:https://i.stack.imgur.com/SenGt.jpg
我收到的错误:
2014-09-24 22:07:15.349 xxx[1509:265380] Stylesheet does not include style matching tree, or includes an old version. Perhaps it was compiled by an old version of the style compiler.
2014-09-24 22:07:15.351 xxx[1509:265380] Please create a radar about this! (Check it's not a dup of rdar://16346611 first though)
2014-09-24 22:07:15.351 xxx[1509:265380] Active tile set: GEOActiveTileSet
My code:
CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(21.779998, 59.447816);
MKCoordinateSpan span = MKCoordinateSpanMake(0.007, 0.007);
MKCoordinateRegion region = {coord, span};
MKPointAnnotation *annotation = [[MKPointAnnotation alloc] init];
[annotation setCoordinate:coord];
[annotation setTitle:@"yyy"];
[self.cell.myMapView setRegion:region];
[self.cell.myMapView addAnnotation:annotation];
[self.cell.myMapView setDelegate:self];
提前致谢!
将 CoreGraphics 框架链接到您的目标。应该解决这个问题。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)