Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. - (UITableViewCell *)tableView:(UITableView *)tableView
  2. cellForRowAtIndexPath:(NSIndexPath *)indexPath
  3. {
  4. static NSString *MyIdentifier = @"MyIdentifier";
  5.  
  6. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
  7.  
  8. if (cell == nil)
  9. {
  10. cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1
  11. reuseIdentifier:MyIdentifier];
  12. }
  13.  
  14.  
  15.  
  16. cell.textLabel.text =[listTableArray objectAtIndex:indexPath.row];
  17. cell.textLabel.textColor=[UIColor grayColor];
  18. cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
  19.  
  20. cell.detailTextLabel.text=@"4mile";
  21.  
  22.  
  23.  
  24.  
  25.  
  26. return cell;
  27. }
  28.  
  29. UIImageView *accessoryView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
  30. accessoryView.image=[UIImage imageNamed:@"list.png"];
  31. cell.accessoryView = accessoryView;
  32.  
  33. UIImageView *accessoryView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
  34. accessoryView.image=[UIImage imageNamed:@"list.png"];
  35. [cell.contentView addSubview:accessoryView];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement