0

我必须错过一些东西。我正在尝试修剪从数组中提取的数据,但我的应用程序在修剪方法上崩溃。

                //pull values
 NSString* thisXStr = [thisSetArray objectAtIndex:0];
 NSString* thisYStr = [thisSetArray objectAtIndex:1];

 //cleaning up all the white space
 NSString *thisXStrTrim = [thisXStr stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
 NSString *thisYStrTrim = [thisYStr stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
4

2 回答 2

1

尝试复制数组对象: NSString *thisXStr = [NSString stringWithString:[thisSetArray objectAtIndex:0]]; ...

于 2010-11-09T14:58:04.683 回答
0

废话,没关系,NSLog上的愚蠢语法错误......

于 2010-11-09T14:41:47.130 回答