Question: Alright so I've two `ViewController`. One is the root and the other one is a filterView that applies some filters on root view controller. FilterView has a `TableView` on it with multiple selection options. When I tap the `UIButton` on root view, it shows the filter view which has the table and I select multiple options form it and when I dismiss the filterView it successfully dismiss it and by using a delegate method it successfully made changes to the `RootViewController`. 

See the image below to have a more clear picture. The button on left (Three Horizontal Bars) will show the filter view controller and similarly the down button shows root view again.
![Image defines the two views I have](https://i.stack.imgur.com/kkHcq.png)

My question is that when I again taps on the button it load the whole table all over again. With no selected value. I want it to hold the checked values so that user can un-check them and check new filter values.

When user taps the filter button here is the code which I'm using:

```
- (IBAction)filterButton:(id)sender
{
    FilterViewController *arvc = [self.storyboard instantiateViewControllerWithIdentifier:@"FilterView"];
    [self presentViewController:arvc animated:YES completion:nil];
}

```

And for back button on FilterView I'm using this:

```
[self dismissViewControllerAnimated:YES completion:nil];

```

So what should i write in back button so that it should keep the multiple checked rows and show if the user view it again. Or something which hide it in the background and show when needed.

Answer: 
When you are pressing your filter button, you are creating a completely new FilterViewController, that's why it won't have any selection or anything from the previous one. If you want to have persistence, you'll need either to always present the same one (so doing **instantiateViewControllerWithIdentifier** once and keeping it around in a property, or after creating it and before presenting it, passing some data to it so it can restore it's status (see [Passing Data between View Controllers](https://stackoverflow.com/questions/5210535/passing-data-between-view-controllers))
**STEP 1:**

In your `.h` file assign a variable `FilterViewController *fvc;`

**STEP 2:**

In your `.m` file write this line in `ViewDidLoad` Method.  
`fvc = [self.storyboard instantiateViewControllerWithIdentifier:@"FilterView"];`

**STEP 3:**  
Copy/Paste the code below as your `- (IBAction)filterButton:(id)sender`- 

```
(IBAction)filterButton:(id)sender
{
    [self presentViewController:fvc animated:YES completion:nil];
}

```

That's it!