i am using the following struct as a return value of a method:
typedef开发者_如何学C struct {
CLLocationCoordinate2D topLeftCorner;
CLLocationCoordinate2D bottomRightCorner;
} LCMapBoundings;
The following method crashes instantly:
-(LCMapBoundings)calculate {
NSLog(@"test");
}
But that one works:
-(LCMapBoundings*)calculate {
NSLog(@"test");
}
Why is that? What am i messing up when using the first method?
Perhaps it's crashing because you don't return a value in your method? That's undefined behaviour.
精彩评论