Difference between NSArray and NSMutable Array

后端 未结 5 1524
北海茫月
北海茫月 2021-01-07 04:44

hi am working with NSArrays using foundation tool and i have wrote the following code

    -(void)simplearrays
{
 NSMutableArray *arr = [NSMutableArray array         


        
5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-07 05:30

    The basic difference is that you cant add an object to NSArray. So if you want to have an array to which you want to add an object you have to use NSMutable array.

提交回复
热议问题