I have property of type CLLocationCoordinate2D, how can I use forward declaration to declare that?
@class CLLocationCoordinate2D;
do not works
I have property of type CLLocationCoordinate2D, how can I use forward declaration to declare that?
@class CLLocationCoordinate2D;
do not works
What you are looking for here is not forward declaration at all. You want to make use of the struct CLLocationCoordinate2D
. First off that is not a class - for forward declaring structs look here.
BUT in your case you do not even have to use forward declaration since you only need to / have to include the correct header in your project. Namely CoreLocation:
@import CoreLocation;
or a little bit old fashioned
#import <CoreLocation/CoreLocation.h>
Additionally you probably have to add the CoreLocation framework as well if you have not done that already.