ios - NSMutableArray adds same object each time -
I'm adding an object to NSMutableArray but it does add a single object Instead of three times
The calendar is in the form of data breeding and sowing names in the array.
for (AppDelegate.calenderSowArray in SOWObject * object) {temp = object.breedingDate; NSLog (@ "date% @", temporary); [Array all array]; (Indx = 0; indices and lieutenant; counteoffrere; indix ++) {SOBOJECT * NEOBAGET = (SOOBJECT *) [APP DEALIEET CALENDERS SAURA ObjectTitx: INDEX]; NSLog (@ "reproduction date% @", neobacter.breedingdate); If ([temp isEqualToString: neObject.breedingDate]) {[arrayNew removeAllObjects]; [Array object: neject]; }} [TestArray addObject: arrayNew]; }
try it,
NSMutableArray * testArray = [[NSMUTABELARROR] INIT]; (App Delegate.calenderSowArray in SOWObject * Object) {[testArray addObject: object]; } This should be enough alone if you want to add all the SOWObject to appdelegate.calendarSowArray in TestArray.
Comments
Post a Comment