1
我正在尝试调试由不再与我们合作的承建商创建的iPhone应用程序。我的背景是C#,并且我根本不熟悉Objective C。我想知道这里的某个人是否可以为我解释一段代码。Objective C - 在请求对象中设置变量
为了给出一点背景,应用程序通过请求对象向.NET服务提供纬度/经度坐标。
(void)ShowNearestPOI:(CLLocationCoordinate2D)coordinate {
ASIFormDataRequest *theRequest = [ASIFormDataRequest requestWithURL:
[self URLBuilderFunctionWithEndpointName:kServiceIdGetNearestPOI]
];
/*
NSString *tmpGeoLatString = [[NSString stringWithFormat:@"%2.6f", coordinate.latitude] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *tmpGeoLongString = [[NSString stringWithFormat:@"%2.6f", coordinate.longitude] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[theRequest setPostValue:tmpGeoLatString forKey:@"latitude"];
[theRequest setPostValue:tmpGeoLongString forKey:@"longitude"];
*/
[theRequest setPostValue:@"1" forKey:@"latitude"];
[theRequest setPostValue:@"1" forKey:@"longitude"];
[theRequest setPostValue:kINGMethodNameGetNearestPOI forKey:@"method"];
[theRequest addRequestHeader:@"User-Agent" value:kCustomUserAgent];
[theRequest setDelegate:self];
[theRequest startAsynchronous];
request_state = 1; // Loading please wait
}
我想知道的是承包商是否分别用1和1硬编码了经度和纬度。我认为这是发生在两条线如下:
[theRequest setPostValue:@"1" forKey:@"latitude"];
[theRequest setPostValue:@"1" forKey:@"longitude"];
任何帮助将不胜感激。干杯!
Arggggh!多烦人! – 2010-11-30 23:41:07