开发者

Issue posting variable with iPhone SDK

I am encountering an issue while posting a variable with Xcode:

While running this code the app crashes while posting the variable to a webservice:

NSArray *array = [stringFromFile componentsSeparatedByString: @","];
NSString *time = [array objectAtIndex:1];
UTCorLocal = time;
NSLog(@"%@", UTCorLocal);

UTCorLocal variable is declared earlier in the code. The NSLog outputs the correct string, but when I try to use it further along in the code it crashes.

When I give the variable a static value like this:

UTCorLocal = @"UTC";

It all runs like it should do!

Could anybody please help, it's driving me crazy!

Thanks开发者_运维问答 a lot,

Ron


It's probably released somewhere along the way, I would guess, without knowing the rest of your code. Try copying or retaining 'time' and see what happens.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜