开发者

NSString To NSSArray

How Can we Store An group OF 开发者_C百科NSString Objects to an Single Array..... starting from index = 0;


NSArray *array = [NSArray arrayWithObjects:string1, string2, string3, nil];

or

NSMutableArray *array = [NSMutableArray array];
[array addObject:string1];
[array addObject:string2];

pick one, or improve your question if I've misunderstood you.


An example:

NSArray *myStringArray = [NSArray arrayWithObjects:@"String", @"Another String", @"Last string", nil];


NSArray *myStringArray = [NSArray arrayWithObjects: string1, string2, string3, ..., stringn, nil];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜