Difference between NSArray and NSMutable Array

后端 未结 5 1522
北海茫月
北海茫月 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:25

    You use NSMutableArray when you want to add/remove objects from the array.

    If you only create array with objects and you don't plan to modify the contents then use NSArray.

    You can convert from one to the other.

提交回复
热议问题