Reload a table view on close of add subview
<p>I have three objects in the applicaion. There is a UItableviewcontroller(with nib file) that shows a list of the items. One UIviewcontroller to add item (with nib file) and a model class that contains item object.</p>

<p>I show the list of item firstly (on application start). I have a navigation button on navigation bar to pop up add view (add as subview) on the same screen (on table view). In add view I have a add button. when I click on add button it adds the record and disappear from the table view but doesn't reload the that.</p>

<p>I have used following code in add item button click action</p>

<pre><code>listitem *home= [[listitem alloc] initWithNibName:@"listitem" bundle:nil];
[self.navigationController pushViewController:home animated:YES];
[home viewWillAppear:YES];
[home release];
[self.view removeFromSuperview];
</code></pre>

<p>In viewwillappear function I am reloading the data from database and also reloading the table view data using reloadData.</p>

<p>Am I doing correct. What is the mistake I am doing.</p>
