Guest User

Untitled

a guest
Jun 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. // Customize the appearance of table view cells.
  2. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  3.  
  4. static NSString *CellIdentifier = @"Cell";
  5.  
  6. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  7. if (cell == nil) {
  8. cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
  9. }
  10.  
  11. // Set up the cell...
  12. switch (indexPath.row) {
  13. case 0:
  14. CGFloat boundsX = cell.contentView.bounds.origin.x;
  15. CGFloat boundsY = cell.contentView.bounds.origin.y;
  16. cell.text = @"Start";
  17. self.startDateSelected.frame = CGRectMake(boundsX + 40, boundsY + 4, 80, 25);
  18. [ cell addSubview: self.startDateSelected];
  19. break;
  20. case 1:
  21. cell.text = @"End";
  22. break;
  23.  
  24. default:
  25. break;
  26. }
  27. return cell;
  28. }
Add Comment
Please, Sign In to add comment