Objective c 串联字符串
为什么上面的代码不能打印'Lenght.png'?因为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
[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);
这个一直让我着迷;你最终会习惯的,参考文档就是你的朋友-谢谢你的快速回复。我以为它只需要自己回来就行了。这一次总是让我着迷;你最终会习惯的,参考文档就是你的朋友-谢谢你的快速回复。我以为它只需要自己回来。