How to create instance of struct in Objective-C that was defined in C file -
in xcode have c classes contains following definition:
typedef struct { double x; double y; double z; coordunit unit; } yg #define ygmeterpoint(x,y,z) __ygpointwithunit(x,y,z,meter)
this used follows in c:
//declares origin point , translated point ygpoint point = ygmeterpoint(994272.661,113467.422); //converts point in lambert zone 1 wgs84 point = ygpointconvertwgs84(point,lambert_i) //convert degree point = ygpointtodegree(point); printf("lat:%.9f - lon:%.9f",point.y,point.x);
but call using objecive-c in xcode. how that?
like @martin r said, can't see why need/want this article explains how it. @ example 2.
Comments
Post a Comment