ios - TableView + CoreData : Add and Refresh -


everyone i'm using coredata in ios application : problem add element need once , refuse add other element. , show me error :

reason: '* -[__nsarraym objectatindex:]: index 3 beyond bounds [0 .. 2]**

how can make table view update self , show me last results. can 1 check me code

- (nsinteger)numberofsectionsintableview:(uitableview *)tableview{     return 1; }  - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:       (nsinteger)section {      //return 3;     return _affichdata1.count; }  - (uitableviewcell*)tableview:(uitableview *)tableview    cellforrowatindexpath:(nsindexpath *)indexpath {      uitableviewcell* mycell=[tableview    dequeuereusablecellwithidentifier:@"cellh" forindexpath:indexpath];      planificateur1 *p1=[_affichdata1 objectatindex:indexpath.row];     mycell.textlabel.text = p1.heuredep[indexpath.row];      return mycell; } 


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -