Thursday, October 30, 2014

[iOS] Create NSArray for non-object data types

Example: MKMapPoint *points; points = malloc(2 * sizeof(MKMapPoint)); points[0] = MKMapPointForCoordinate(CLLocationCoordinate2DMake(0, 1)); points[1] = MKMapPointForCoordinate(CLLocationCoordinate2DMake(1, 1)); .... free(points);

No comments:

Post a Comment