I want to build an array of strings, that can point every time to a different string. I saw that I can use NSArray and NSMutableArray.
What is the difference between them?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Straight from Apple:
NSArray
NSMutableArray
Main difference:
NSArray is non-mutable, meaning it cannot be altered once it is created and is usually faster and carries less of a memory footprint than its mutable counterpart.
NSMutableArray can be changed after it is created.
There are more differences than just that, but the documentation goes over them better than I can. I also recommend watching the free IOS Development lectures from Stanford available on iTunes. They go into the different data structures and how they can be used in much greater depth.