0
NSString* title = [rescue objectForKey:@"title"];
NSString* name = [rescue objectForKey:@"name"];


NSMutableArray* listBossF = [[NSMutableArray alloc] initWithObjects:@"Hello %@ %@  I've just arrived"[title, name] ,
                                   @"Hello  %@ %@everything is fine",
                                   @"Hello  %@ %@ are there any news back at the office?",
                                   @"Hello ( %@ %@ i arrived at the hotel" ,
                                   @"Hello %@ %@ I've just arrived at the airport", nil];

你好,我对 xcode 非常陌生,实际上对一般编程来说,我已经尝试了很长一段时间来将对象添加到数组的特定部分(这就是我不能使用 componentsJoinedByString 的原因)但我有很多麻烦这样做,我通常做的方式谁能告诉我我做错了什么?如果我不能将对象添加到数组的特定部分,任何人都可以给我一个我应该尝试的建议吗?谢谢。

4

1 回答 1

2

您可以将对象添加到数组的特定部分,如下所示:

[array insertObject:@"Hello" atIndex:1]; // After first object in array
于 2012-08-24T21:08:19.127 回答