NSArray storing MutableArrays

Discussion in 'Mac Programming' started by larswik, May 19, 2015.

  1. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #1
    Quick question, I don't think I need to post code. I understand NSArrays can not be changed. But if I create an NSArray that contains NSMutableArrays, am I able to change the data in the MutableArrays, or is everything immutable since it is stored in an NSArray?
     
  2. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #2
    Yes, you can change the mutable arrays in the wrapper array. NSArray doesn't know what they are other than some NSObject.
     
  3. larswik thread starter macrumors 68000

    Joined:
    Sep 8, 2006
    #3
    Thanks, tracking down some code problems and wanted to eliminate that as a possible problem.
     

Share This Page