小编Mar*_*ida的帖子

应用程序在iOS6上使用MapKit崩溃

我的专用于iPad的应用程序中的谷歌地图有一个奇怪的问题(使用iOS6).我做了一个水平滚动视图,里面有两个视图.一个是详细信息视图(一些文本,没什么特别的),第二个视图是一个带谷歌地图的视图控制器.这是我的应用程序中的通用方案(从两个视图构建scrollview),用于几个不同的目的.当我开始在iOS6的真实iPad上测试应用程序时会出现问题.应用程序应该查看滚动视图时崩溃.但不是立即的.开始时,可​​以正确查看滚动视图.然后我想用新数据构建一个新的滚动视图.它也很好,滚动视图可以正常查看.经过几次这样的操作后,我开始收到越来越多的错误日志,如下所示:

failed to make complete framebuffer object 8cdd

在几次scrollView运行之后,应用程序崩溃而没有任何其他错误.代码编辑器指向main.m文件,以及以下行:

int retVal = UIApplicationMain(argc, argv, nil, nil);

请指导我找出我做错了什么.我的视图控制器中负责查看谷歌地图的viewDidLoad方法在哪里:

-(void)viewDidLoad {
mapView.mapType = MKMapTypeSatellite;
mapView.showsUserLocation = YES; 

/* ANNOTATION (pin) */

CLLocationCoordinate2D annotationCoord;

annotationCoord.latitude = [self.restaurant.latitude doubleValue];
annotationCoord.longitude = [self.restaurant.longitude doubleValue];

// a pin with the info. 

MKPointAnnotation *annotationPoint = [[MKPointAnnotation alloc] init];

annotationPoint.coordinate = annotationCoord;
annotationPoint.title = self.restaurant.name;

// add annotation to the map

    [mapView performSelectorOnMainThread:@selector(addAnnotation:)
                                  withObject:annotationPoint
                                  waitUntilDone:YES];


[annotationPoint release];  

MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance (annotationCoord, 500, 500); 
[self.mapView setRegion:region animated:YES];

[super …
Run Code Online (Sandbox Code Playgroud)

crash scrollview mapkit ios6 ios6-maps

6
推荐指数
1
解决办法
405
查看次数

标签 统计

crash ×1

ios6 ×1

ios6-maps ×1

mapkit ×1

scrollview ×1