ios - How can I move the values in NSMutableArray to NSArray -


i have array of recommendedcar ids, , array of allcar ids. this, have take recommendedcar images. first, check whether recommended carid in allcar id; if is, select corresponding car images, , store them nsarray.

this code using.

 (int i=0;i<[listofcarid count];i++) {     (int j=0;j<[_allcarid count];j++) {         tempallcarid=[_allcarid objectatindex:j];         temprecommendedcarid=[listofcarid objectatindex:i];         if ([temprecommendedcarid isequaltostring:tempallcarid]) {               _recommendedcarimage=[_allcarimages objectatindex:j];             nslog(@"finalimage%@",_recommendedcarimage);         }     } } 

_recommendedcarimage nsmutablearray; want nsarray. how can convert nsarray?

how can replace "_recommendedcarimage " nsarray?? _recommendedcarimage mutable array.

polymorphism. since nsmutablearray subclass of nsarray, can use anywhere nsarray expected. don't have anything.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -