您的位置:首页 > 移动开发 > IOS开发

IOS9后自定义大头针无法正常显示

2015-09-23 12:02 363 查看


地图上设置MKAnnotationView 的image属性,IOS9无法正常显示

代码如下:


MKPinAnnotationView *annotationView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:locationReuseIndetifier];

annotationView.canShowCallout = NO;

annotationView.draggable = NO;

annotationView.image = [UIImage imageNamed:@"img_custom"];

return annotationView ;

修改成:


MKAnnotationView *annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:ReuseIndetifier];

annotationView.canShowCallout = NO;

annotationView.draggable = NO;

annotationView.image = [UIImage imageNamed:@"img_custom"];

return annotationView ;

便可以正常显示
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: