daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  2. {
  3. // Return the number of sections.
  4. return 1;
  5.    
  6. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  7. {
  8. // Return the number of rows in the section.
  9.  
  10. NSLog(@"Row count :%d",self.playerNames.count + 1);
  11. return self.playerNames.count + 1;
  12.    
  13. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  14. {
  15. static NSString *CellIdentifier = @"PlayerName";
  16. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  17. if (cell == nil) {
  18.     cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
  19. }
  20.  
  21. if (indexPath.row < self.playerNames.count) {
  22.     cell.textLabel.text = [self.playerNames objectAtIndex:indexPath.row];
  23. }
  24.  
  25. NSLog(@"Cell Text :%@",cell.textLabel.text);
  26. return cell;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top