Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 1.09 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Error in Loading TableView
  2. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  3.     return self.nameList.count;
  4.  
  5. }
  6. -(UITableViewCell *)tableview:(UITableView *)tableview cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  7.  
  8.     static NSString *CellIdentifier=@"Cell";
  9.  
  10.     UITableViewCell *cell=[tableview dequeueReusableCellWithIdentifier:CellIdentifier];
  11.  
  12.     if (cell==nil) {
  13.  
  14.         cell=[[UITableViewCell alloc]initWithFrame:CGRectZero reuseIdentifier:CellIdentifier];
  15.         //cell = [[UITableViewCell alloc]
  16.         //   initWithStyle:UITableViewCellStyleDefault
  17.         // reuseIdentifier:CellIdentifier];
  18.  
  19.     }
  20.     //Setup the cell
  21.      NSString *cellValue=[ListofItems objectAtIndex:indexPath.row];
  22.     cell.text=cellValue;
  23.     cell.textLabel.text = [self.nameList              objectAtIndex: [indexPath row]];
  24.  
  25.     return cell;
  26.  
  27. }
  28.  
  29. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  30.     return 1;
  31. }
  32.        
  33. return self.nameList.count;
  34.        
  35. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  36.     return 1;
  37.  
  38. }