title: UITableView(with sqlite3) not update
body: <p>i'm korean my english so simple<br>
  very very sorry<br>
  please help me</p>
  
  <p>my application example phone book.
  two View and tab bar with sqlite3 DB</p>
  
  <p>first view is table view cell list, there are name is linked DB<br>
  second view save and find and delete phone book list with SQL query.  </p>
  
  <p>i want secondview save data and change tab update data list.</p>
  
  <p>i coded [viewDidAppear] reloadData method</p>
  
  <p>close the application re-open apllication is updated.</p>
  
  <p>but not updated change the tap T_T please help me.</p>
  
  <p><strong>FirstViewController.h</strong></p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "sqlite3.h"
  
  @interface FirstViewController : UIViewController &lt;UITableViewDelegate,UITableViewDataSource&gt;
  {
      NSString *path;
      NSString *dbName;
      NSString *databasePath;
      sqlite3 *contactDB;
  }
  @property (nonatomic) sqlite3 *contactDB_2;
  @property (strong,nonatomic) IBOutlet UITableView *myTable;
  @property (nonatomic,retain) NSMutableArray *quizs;
  
  -(void)checkAndCreateDatabase;
  -(void)readFromDatabase;
  
  @end
  </code></pre>
  
  <p><strong>FistViewController.m</strong></p>
  
  <pre><code>#import "FirstViewController.h"
  #import "person.h"
  
  @implementation FirstViewController
  
  @synthesize contactDB_2,myTable;
  @synthesize quizs;
  
  -(void)checkAndCreateDatabase{
  NSFileManager *filemgr = [NSFileManager defaultManager];
  if([filemgr fileExistsAtPath:databasePath] == NO){
      const char *dbPath = [databasePath UTF8String];
      if(sqlite3_open(dbPath,&amp;contactDB) == SQLITE_OK){
          char *errMsg;
          const char *sql_stmt = "CREATE TABLE IF NOT EXISTS CONTACTS(ID INTEGER PRIMARY KEY AUTOINCREMENT,NAME TEXT,ADRESS TEXT, PHONE TEXT)";
          sqlite3_exec(contactDB, sql_stmt, NULL, NULL, &amp;errMsg);
          sqlite3_close(contactDB);
      }
  }
  }
  -(void)readFromDatabase
  {
  const char *dbpath = [databasePath UTF8String];
  sqlite3_stmt *statement;
  if(sqlite3_open(dbpath, &amp;contactDB)==SQLITE_OK)
  {
      NSString *querySQL = [NSString stringWithFormat:@"SELECT name,phone FROM contacts"];
      const char *query_stmt = [querySQL UTF8String];
      if(sqlite3_prepare_v2(contactDB, query_stmt, -1, &amp;statement, NULL)==SQLITE_OK)
      {
          while(sqlite3_step(statement)==SQLITE_ROW){
              NSString* nameField = [[NSString alloc]initWithUTF8String:(const char*)sqlite3_column_text(statement, 0)];
              NSString* phoneField = [[NSString alloc]initWithUTF8String:(const char*)sqlite3_column_text(statement, 1)];
  
              person *persons = [person alloc];
  
              [persons setName:nameField];
              [persons setPhone:phoneField];
  
              [quizs addObject:persons];
  
          }
          sqlite3_finalize(statement);
          [myTable reloadData];
      }
      sqlite3_close(contactDB);
  }
  }
  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  {
  self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  if (self) {
      self.title = NSLocalizedString(@"전화번호목록", @"전화번호목록");
      self.tabBarItem.image = [UIImage imageNamed:@"first"];
  }
  return self;
  }
  
  - (void)didReceiveMemoryWarning
  {
  [super didReceiveMemoryWarning];
  // Release any cached data, images, etc that aren't in use.
  }
  
  pragma mark - View lifecycle
  
  - (void)viewDidLoad
  {
  dbName = @"contacts2.db";
  NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDir = [documentPaths objectAtIndex:0];
  databasePath = [documentsDir stringByAppendingPathComponent:dbName];
  [self checkAndCreateDatabase];
  quizs = [[NSMutableArray alloc] initWithCapacity:100];
  [self readFromDatabase];
  [super viewDidLoad];
  }
  
  - (void)viewDidUnload
  {
  [super viewDidUnload];
  // Release any retained subviews of the main view.
  // e.g. self.myOutlet = nil;
  
  }
  
  - (void)viewWillAppear:(BOOL)animated
  {
  [super viewWillAppear:animated];
  [myTable delegate];
  
  }
  
  - (void)viewDidAppear:(BOOL)animated
  {
  [super viewDidAppear:animated];
  [quizs removeAllObjects];
  [self checkAndCreateDatabase];
  [self readFromDatabase];
  [myTable reloadData];
  }
  
  
  - (void)viewWillDisappear:(BOOL)animated
  {
  [super viewWillDisappear:animated];
  }
  
  - (void)viewDidDisappear:(BOOL)animated
  {
  [super viewDidDisappear:animated];
  }
  
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
  // Return YES for supported orientations
  return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
  }
  
  -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView
  {
  return 1;
  }
  -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
  return quizs.count;
  }
  
  -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  static NSString* cellIdentifier = @"cell";
  
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
  
  if(cell == nil)
  {
      cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
  
  }
  person *p = [quizs objectAtIndex:indexPath.row];
  NSString *str = [[NSString alloc]initWithFormat:@"%@ %@",p.name,p.phone];
  cell.textLabel.text = str;
  
  return cell;
  }
  
  -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
  NSInteger row = indexPath.row;
  
  NSString *temp = [[NSString alloc]initWithFormat:@"%d번쨰꺼 선택해뜸",row+1];
  
  UIAlertView *alert =[[UIAlertView alloc] initWithTitle:@"터치" message:temp delegate:self cancelButtonTitle:nil otherButtonTitles:@"확인", nil];
  
  [alert show];
  [tableView deselectRowAtIndexPath:indexPath animated:YES];
  }
  
  @end
  </code></pre>
  
  <h1>I want change the tab and update cell list.</h1>