我看到一种奇怪的行为,我需要一些帮助.
在structure.h我有:
typedef struct {
NSString *summary;
NSArray *legs;
NSString *copyrights;
struct polylineSruct overview_polyline;
struct directionBounds bounds;
} route;
typedef struct {
NSArray *routes;
NSString *status;
} directions;
Run Code Online (Sandbox Code Playgroud)
在结构中,我有:
(directions) a_Function_that_builds_the_struct
{
directions direct;
direct.status = @"OK";
NSMutableArray *routes = [NSMutableArray array];
for(xxx)
{
route routeL;
routeL.summary = @"1";
routeL.copyrights = @"2";
NSValue *boxedroute = [NSValue valueWithBytes:&routeL objCType:@encode(route)];
[routes addObject:boxedroute];
}
direct.routes = routes;
return direct;
}
Run Code Online (Sandbox Code Playgroud)
在list_itemsViewController.h我有:
implementation XXX:YYY{
directions directionsLoc;
}
@property (assign) directions directionsLoc;
Run Code Online (Sandbox Code Playgroud)
在list_itemsViewController.h我有:
@synthesize directionsLoc; …Run Code Online (Sandbox Code Playgroud)