nsarray - UITableView addcell to bottom in edit mode -



nsarray - UITableView addcell to bottom in edit mode -

i'm trying create table add together cell @ bottom of table adding cells, table on delete mode, people can delete, so need add together cell insert insert cell. errors saying app isn't consistent nsarray. how create work?

step 1 override setediting on tableviewcontroller insert or delete add together row

- (void)setediting:(bool)editing animated:(bool)animate { bool prevediting = self.editing; [super setediting:editing animated:animate]; [tableview setediting:editing animated:animate]; if (editing && !prevediting) { // started editing [self.tableview insertrowsatindexpaths:....] withrowanimation:uitableviewrowanimationfade]; } else if (!editing && prevediting) { // stopped editing [self.tableview deleterowsatindexpaths:....] withrowanimation:uitableviewrowanimationfade]; } }

then ensure returning right number of rows

- (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { nsinteger numberofrows = xxxxxx; if (self.editing) { numberofrows++; } homecoming numberofrows; }

uitableview nsarray

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -