本文介绍了MKMapView在iOS 8中显示空白屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了在iOS 8中显示MKMapView的问题。
I am having an issue with displaying a MKMapView in iOS 8.
它在iOS 7中运行良好,现在工作正常,但仅限于模拟器。
It worked fine in iOS 7 and it is working fine now but only on simulator.
在设备上它只显示注释但没有后面的地图。
On device it shows only annotations but no map behind.
它看起来像这样:
我收到的错误:
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
我的代码:
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框架链接到您的目标。应该解决这个问题。
Link CoreGraphics framework to your target. Should fix that.
这篇关于MKMapView在iOS 8中显示空白屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!