Possible Duplicate:
How do I convert NSMutableArray to NSArray?
How can I Convert NSMutableArray to NSArray in Objective C. i.e. without using loop that addObjects one by one.
An NSMutableArray is an NSArray already (as it's a subclass of NSArray), but if you really need to create a new immutable instance you can do:
NSArray *myArray = [NSArray arrayWithArray:myMutableArray];
How about this code?
NSArray* array = [NSArray arrayWithArray:myMutableArray];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With