问题
For the code below :
CGRect frame = CGRectMake(0, 0, cellWidth, 240);
MKMapView *mapView = [[MKMapView alloc] initWithFrame:frame];
mapView.layer.masksToBounds = YES;
mapView.layer.cornerRadius = 10.0;
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
EDIT: 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.
Thanks
回答1:
Did you: #import <QuartzCore/QuartzCore.h>
?
回答2:
You should import QuartzCore/QuartzCore.h framework in your particular class or file. I think you are not importing this framework in your particular file.
来源:https://stackoverflow.com/questions/15196105/member-access-into-incomplete-type-calayer