I have a problem in xcode. I want to two array and two tableview same view controller. My tableviews tags 1001 and 2002. I call web service and make my arrays successfully. I run it and only table1 (tag 1001) is showing value. 2002 nil. My Code is :

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { if (tableView.tag == 1001) { return 1; } else { return 1; } } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if(tableView.tag==1001) { NSLog(@"self.Data count: %lu", (unsigned long)[menuData count]); return [menuData count]; } else NSLog(@"self.İçkiler: %lu", (unsigned long)[icecekData count]); return [icecekData count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; int indicator = UITableViewCellAccessoryDisclosureIndicator; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } NSString * cellValue; if (tableView.tag==1001) { veriler=[menuData objectAtIndex:[indexPath row]]; NSLog(@"Name : %@ ", veriler.menuadi); cellValue= veriler.menuadi; } if (tableView.tag==2002) { veriler=[icecekData objectAtIndex:[indexPath row]]; NSLog(@"Name : %@ ", veriler.icecek); cellValue= veriler.icecek; } cell.textLabel.text=cellValue; cell.selectionStyle=UITableViewCellSelectionStyleNone; return cell; }

What is wrong in my code. Can u help me please. Thanks.