Saturday 15 March 2014

ios - Collection was mutated while being enumerated -


I'm trying to click on a second button from Uitextfield to go to UItableview, Throwing error message; __SSARMM: 0x837cb90 & gt; The previous button is working perfectly.

This is when I am the second last cell of a tableview and want to move the last cell. Below are some code snippets:

  - (UITableViewCell *) TableView: (UITableView *) Table View CellForUndApp Path: (NSIndexPath *) Index pathway {NSString * CellIdentifier = @ "cell"; NSUnitor Row = [index line]; Customcell * cell = (customs *) [tableviews divutual cavity proof identifier: cell identifier]; If (cell == blue) {// need to create a new cell cell = [[custom CL Alok] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier]; Cell. Selection Options = UITableViewCellSelectionStyleNone; } NSDictionary * product = [DataArrayAbjectAttexX: indexpath.ro]; Cell.lblProductContName.text = [Product Objectwork: @ "ProductContents and Names"]; Cell.txtQty.delegate = self; Cell.txtQty.tag = 100 + line; Cell.txtQty.text = [txtFieldArray object atxx: indexpath.ro]; Return room;   

}

The next button, code on the first and last button.

  - Parapap (zero) Sender: (ID) Sender {NSArray * visiableCells = [self.myTableView view]; [VisibleCellNews objectUpping Block: ^ (ID Oz, NSUnitezer IDX, Ball * stop) {customcell * cell = (customcell *) OBG; If (cell.txtQty.tag == selected cellindex) {[cell.txtQty resignFirstResponder]; } And if (cell.txtQty.tag == selected cell index - 1) {[cell.txtQty becomes First Responder]; * Stop = yes; }}]; } - Next to (zero): (ID) sender {NSArray * visiableCells = [self.myTableView view]; [VisibleCellNews objectUpping Block: ^ (ID Oz, NSUnitezer IDX, Ball * stop) {customcell * cell = (customcell *) OBG; If (cell.txtQty.tag == selected cellindex) {[cell.txtQty resignFirstResponder]; } And if (cell.txtQty.tag == Selected Seinde + 1) {[cell.txtQty First Responder]; * Stop = yes; }}]; } - at (zero) don: (ID) sender {NSArray * visiableCells = [self.myTableView visible]; [VisibleCellNews objectUpping Block: ^ (ID Oz, NSUnitezer IDX, Ball * stop) {customcell * cell = (customcell *) OBG; If (cell.txtQty.tag == selected cellindex) {[cell.txtQty resignFirstResponder]; }}]; }    

A long shot, but probably the keyboard is hidden / shown or any other Because of what I imagine, depends on the number of that cell (trying with 100 cells, it will crash the screen in the last cell without scrolling) and the table view size, the number of the visible cell when You resign / become the first responder (aka, table view different keys) Displays). Try making a copy of the first array:

NSArray * visibleCells = [[self.myTableViewViewCell] copy];

No comments:

Post a Comment