Moda View Controller

I have a table in my view controller (let it be called TVC1). I have lines in TVC1 that are used so that the user can enter some more data in addition to the data on TVC1. So, when someone deletes a specific line in TVC1, he displays a different view controller (let it be called TVC2). However, when TVC2 is displayed, all data in TVC1 is cleared. How to save data to TVC1? Should I do this through the application delegate?

        DescriptionInputViewController *descriptionController = [[DescriptionInputViewController alloc] 
                                                             initWithNibName:@"DescriptionInputView" 
                                                             bundle:nil];

    [self presentModalViewController:navController animated:YES];
    [self.navigationController pushViewController:descriptionController animated:YES];
    [descriptionController release];
+3
source share
1 answer

In your code you should call:

[self presentModalViewController:descriptionController animated:YES]

descriptionController is the view controller that you display.

+5
source

Source: https://habr.com/ru/post/1732343/


All Articles