Создайте свойство изменяемого массива в первом контроллере и передайте этот массив и индекс второму контроллеру.
FirstController.h
@property (nonatomic,retain) NSMutableArray *myStrings;
FirstController.m
@synthesize myStrings;
init {
self.myStrings = [NSMutableArray arrayWithCapacity:8];
}
didSelectRowAtIndexPath {
SecondVC *vc = [[SecondVC new];
[self.theStrings addObject:@"Original String"]; // or replaceAtIndex: indexPath.row
vc.theStrings = self.myStrings;
vc.theIndex = indexPath.row;
//push detail vc.
}
SecondController.h
@property (nonatomic, retain) NSMutableArray *theStrings;
@property (nonatomic ) int theIndex;
SecondController.m
@synthesize theStrings;
@synthesize theIndex;
doneEditingMethod {
[self.theStrings replaceObjectAtIndex: self.theIndex withObject: myNewString];
}