Outputing struct to NSLog for debugging?
Posted
by fuzzygoat
on Stack Overflow
See other posts from Stack Overflow
or by fuzzygoat
Published on 2010-05-20T14:01:43Z
Indexed on
2010/05/20
14:30 UTC
Read the original article
Hit count: 459
I am just curious, is there a way to print via NSLog the contents of a struct?
id <MKAnnotation> mp = [annotationView annotation];
MKCoordinateRegion region =
MKCoordinateRegionMakeWithDistance([mp coordinate], 350, 350);
I am trying to output whats in [mp coordinate]
for debugging.
.
EDIT_001:
I cracked it, well unless there is another way.
id <MKAnnotation> mp = [annotationView annotation];
CLLocationCoordinate2D location = [mp coordinate];
NSLog(@"LAT: %f LON: %f", location.latitude, location.longitude);
many thanks
gary
© Stack Overflow or respective owner