title: UIToolBar with UITableView - TableView is not refreshing when loaded
body: <p>The UIToolBar has two views, a UIView w/UITextViews and a UIView w/UITableView.</p>
  
  <p>The UITableView that gets called via a UIToolBar. The first time the UITableView loads, it hits the DB and gets the info. I "tab" back to the UIView w/UITextViews select some data, and then "tab" back to the UITableView, but none of the delegate methods get called, like viewDidLoad or initWithNibName or anything, thus the data in the table is stale.</p>
  
  <p>So, I found out the method</p>
  
  <pre><code>-(void)viewWillAppear:(BOOL)animated { 
  </code></pre>
  
  <p>is called, HOWEVER, it doesn't have access to the tableView, like say, </p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  </code></pre>
  
  <p>I did stumble upon this recommendation:</p>
  
  <blockquote>
    <p>"I can't seem to figure out how to make
    the UITableView refresh ... I did find
    this, which seems like the same
    problem I'm having, </p>
    
    <p>What I did is to create a
    MyTableViewController* property in
    MyModalViewController class. Before
    presentModalView, I store the table
    view controller pointer to this
    property in modal view controller.</p>
    
    <p>Now I have a reference to table view
    controller when I'm in the modal view
    controller. Now just use this stored
    table view controller to locate its
    tableView, then reloadData.</p>
    
    <p>Feels dirty but gets work done."</p>
  </blockquote>
  
  <p>If that's the answer, I'm not sure how to code it.</p>
  
  <p>Thanks ahead! </p>
  
  <ul>
  <li>sk</li>
  </ul>
  
  <p>Note: I just tried this:</p>
  
  <p>.h</p>
  
  <pre><code> UITableView *tableViewPtr; 
  @property (nonatomic, retain) UITableView *tableViewPtr; 
  </code></pre>
  
  <p>.m </p>
  
  <pre><code>@synthesize tableViewPtr; 
  </code></pre>
  
  <p>And store it in - </p>
  
  <pre><code>(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {:
   ... 
   self.tableViewPtr = tableView; 
   ... 
  </code></pre>
  
  <p>Then try to call it from </p>
  
  <pre><code>-(void)viewWillAppear:(BOOL)animated {
   [self.tableViewPtr reloadData]; 
  </code></pre>
  
  <p>But that doesn't seem to work.</p>