Hi I need the redefine an ios method (CLLocationCoordinate2DMake) with this code:
static inline CLLocationCoordinate2D CLLocationCoordinate2DInlineMake(CLLocationDegrees latitude, CLLocationDegrees longitude)
{
CLLocationCoordinate2D coord;
coord.latitude = latitude;
coord.longitude = longitude;
return coord;
}
#define CLLocationCoordinate2DMake CLLocationCoordinate2DInlineMake
But I don’t know where put this code…
Thanks
For the record, I assume you’re working from:
http://www.cocoanetics.com/2010/09/backwards-compatibility-if-apple-starts-polishing/
Either way, you just need to stick it in a header which you’ll import wherever you intend to use
CLLocationCoordinate2DMake. You could even include it in you .pch file if you really wanted to, which would make it available everywhere with no further effort on your part.