本文介绍了成员访问不完整类型"CALayer"的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于以下代码:
CGRect frame = CGRectMake(0, 0, cellWidth, 240);
MKMapView *mapView = [[MKMapView alloc] initWithFrame:frame];
mapView.layer.masksToBounds = YES;
mapView.layer.cornerRadius = 10.0;
我还包括了MapKit,QuartzCore和CoreLocation框架.对于最后两行,我收到错误消息:对不完整类型'CALayer'的成员访问"
I included MapKit,QuartzCore and CoreLocation Frameworks in addition.For the last 2 lines, I am getting error : "Member access into incomplete type 'CALayer'"
请告诉我为什么会出现此错误以及如何解决此问题
Please tell me why I get this error and how to resolve this
因为没有导入Quartz.h,所以出现了此错误,但是我仍然不明白为什么它说CALayer类型的不完整性.任何人都可以深入探讨这个问题.
I got this error as I did not import Quartz.h, but i still dont understand why its saying incompleteness of CALayer type. Can anyone throw some light into depth of this.
谢谢
推荐答案
您是否: #import< QuartzCore/QuartzCore.h>
?
这篇关于成员访问不完整类型"CALayer"的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!