Skip to content

Instantly share code, notes, and snippets.

@keicoder
Created January 7, 2014 09:48
Show Gist options
  • Select an option

  • Save keicoder/8297107 to your computer and use it in GitHub Desktop.

Select an option

Save keicoder/8297107 to your computer and use it in GitHub Desktop.
objective-c : 구조체
Structs
//for example :
typedef struct {
CLLocationDegrees latitude;
CLLocationDegrees longitude;
} CLLocationCoordinate2D;
//CLLocationDegrees, which is a synonym for double:
typedef double CLLocationDegrees;
so, CLLocationCoordinate2D is basically this:
typedef struct {
double latitude;
double longitude;
} CLLocationCoordinate2D;
//The reason the designers of Core Location used CLLocationDegrees instead of double is that
//“CL Location Degrees” tells you what this datatype is intended for: it stores the degrees of a location.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment