ios - Objective C Passing Data -
displaycontoller *show = [[displaycontroller alloc] initwithnibname:@"displaycontroller" bundle:[nsbundle mainbundle]]; contacts *contacts = [arr objectatindex:indexpath.row]; show.context = context; show.contacts = contacts;
in display view controller ok, , again passing same data edit view controller
editcontoller *edit = [[editcontroller alloc] initwithnibname:@"editcontroller" bundle:[nsbundle mainbundle]]; edit.context = context; edit.contacts = contacts;
in edit view controller empty cells if print data (null)
if skip detail view controller, table edit view controller works great... when table view display edit view, zeros(nill).
in display, insert these 2 logs before 2 assignments , observe log.
nslog(@"context: %@", context); // see valid data nslog(@"contacts: %@", contacts); // see valid data edit.context = context; edit.contacts = contacts;
Comments
Post a Comment