Guest User

Untitled

a guest
May 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  2.  
  3. static NSString *MyIdentifier = @"MyIdentifier";
  4.  
  5. CustomCells *cell = (CustomCells *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
  6. if (cell == nil) {
  7. cell = [[[CustomCells alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease];
  8. }
  9. ClassObj *appdelegate = (ClassObj *)[[UIApplication sharedApplication] delegate];
  10.  
  11. // Configure the cell
  12. ClassObj *itemAtIndex = (ClassObj *)[appdelegate.allClass objectAtIndex:indexPath.row];
  13.  
  14. [cell setData:itemAtIndex];
  15. NSLog(@"%d", [itemAtIndex.building integerValue]);
  16.  
  17. return cell;
  18. }
Add Comment
Please, Sign In to add comment