How to add string objects to NSMutableArray

前端 未结 6 1186
难免孤独
难免孤独 2021-01-01 10:06

I have an NSMutableArray named randomSelection:

NSMutableArray *randomSelection;

I am then trying to add strings to this array if certain c

6条回答
  •  粉色の甜心
    2021-01-01 10:49

    Try this:

    NSMutableArray *randomSelection = [[NSMutableArray alloc]init]; 
    [randomSelection addObject:@"string1"];
    

提交回复
热议问题