Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 串联字符串_Objective C - Fatal编程技术网

Objective c 串联字符串

Objective c 串联字符串,objective-c,Objective C,为什么上面的代码不能打印'Lenght.png'?因为[arraySystem objectAtIndex:[countImage intValue]]等于'Length' 它只打印“Lenght”在调用stringByAppendingString时放置一个“oneTextText=”,它应该是: NSMutableArray * oneText = [[NSMutableArray alloc] init]; [oneText addObject:[arraySystem objectAtI

为什么上面的代码不能打印'Lenght.png'?因为
[arraySystem objectAtIndex:[countImage intValue]]
等于'Length' 它只打印“Lenght”

在调用stringByAppendingString时放置一个“oneTextText=”,它应该是:

NSMutableArray * oneText = [[NSMutableArray alloc] init];
[oneText addObject:[arraySystem objectAtIndex:[countImage intValue]]];
[oneText addObject:@".png"];
NSString *oneTextText=[oneText objectAtIndex:0];
[oneTextText stringByAppendingString:[oneText objectAtIndex:1]];
NSLog(oneTextText);
在调用stringByAppendingString时,放置一个“oneTextText=”,它应该是:

NSMutableArray * oneText = [[NSMutableArray alloc] init];
[oneText addObject:[arraySystem objectAtIndex:[countImage intValue]]];
[oneText addObject:@".png"];
NSString *oneTextText=[oneText objectAtIndex:0];
[oneTextText stringByAppendingString:[oneText objectAtIndex:1]];
NSLog(oneTextText);

这个一直让我着迷;你最终会习惯的,参考文档就是你的朋友-谢谢你的快速回复。我以为它只需要自己回来就行了。这一次总是让我着迷;你最终会习惯的,参考文档就是你的朋友-谢谢你的快速回复。我以为它只需要自己回来。