objective c - How to remove array object from for loop -


Please help me I was stuck when I deleted the object from the array.

 for  (IDR obj in self.arrSavedImage) {class class = [obj class]; Id newObj = [[CLS Alok] init]; // UIImage * img = zero; If ([New Oscillation Off Class: [UIImage class]]) {NSLog (@ "Class Type% @", [New Oz Class]); } And {{self. RRSVI Image Removal Object: OBG]; }}  

Thanks.

You should not remove objects from an orange that you are enumerating on the list of those objects better The ones that you want to delete, and then delete them when you enumerate the original array:

  NSMutableArray * toDelete = [NSMutableArray new]; For (id. Obj in self.arrSavedImage) {class class = [obj class]; Id newObj = [[CLS Alok] init]; If ([New Oscillation Off Class: [UIImage class]]) {NSLog (@ "Class Type% @", [New Oz Class]); } Other {[toDelete addObject: obj]; }} (ToDelete in IDE obj) [self. Remove RRSV Image Object: obj];  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -