iOS   发布时间:2022-05-04  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ios – 使用MKMapView时出错大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

我用故事板创建了一个单一的视图应用程序.我所看到的只有MKMapView,就是这样.它编译时没有错误或警告,但是当我运行它时,我在控制台窗口中收到此错误: <Error>: ImageIO: CGImageReadSessionGetCachedImageBlockData *** CGImageReadSessionGetCachedImageBlockData: readSession [
我用故事板创建了一个单一的视图应用程序.我所看到的只有MKMapView,就是这样.它编译时没有错误或警告,但是当我运行它时,我在控制台窗口中收到此错误

<Error>: ImageIO: CGImageReadSessionGetCachedImageBlockData ***   CGImageReadSessionGetCachedImageBlockData: readSession [0x8ab5750] has bad readRef [0x14b79c70]

我正在使用Xcode 4.3和iPhone模拟器5.1.有什么想法吗?

.h文件

#import UIKit/UIKit.h
#import CoreLOCATIOn/CoreLOCATIOn.h
#import MapKit/MapKit.h

@interface WhereamiViewController : UIViewController <CLLOCATIOnManagerDelegate,MKMapViewDelegate>
{ 
IBOutlet MKMapView *worldView;
IBOutlet UIActivityInDicatorView *activityInDicator;
IBOutlet UITextField *LOCATIOntitleField;
}

@end

.m文件

#import "WhereamiViewController.h"

@interface WhereamiViewController ()

@end

@implementation WhereamiViewController

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view,typically from a nib.
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

@end

解决方法

刚碰到这个:

简单修复:确保在界面构建器中选中MapView的“显示用户位置”框.

大佬总结

以上是大佬教程为你收集整理的ios – 使用MKMapView时出错全部内容,希望文章能够帮你解决ios – 使用MKMapView时出错所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。