NSMutableArray removeObjectAtIndex strange issue.

前端 未结 2 982
挽巷
挽巷 2020-12-20 20:49

Strange behaviour in NSMutableArray.

I\'ve created object and filled it.

NSMutableArray *array = [[NSMutableArray alloc] 
                       


        
2条回答
  •  失恋的感觉
    2020-12-20 21:15

    your same code is working fine., just clean and build the project. here is my code

    NSMutableArray *sampleArray = [[NSMutableArray alloc]
                             initWithObjects:@"1",@"2",@"3",@"4", nil];
    NSLog(@"%@", sampleArray);
    [sampleArray removeObjectAtIndex:0];
    NSLog(@"%@", sampleArray);
    

提交回复
热议问题