Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
- {
- // Return the number of sections.
- return 1;
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- {
- // Return the number of rows in the section.
- NSLog(@"Row count :%d",self.playerNames.count + 1);
- return self.playerNames.count + 1;
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString *CellIdentifier = @"PlayerName";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
- }
- if (indexPath.row < self.playerNames.count) {
- cell.textLabel.text = [self.playerNames objectAtIndex:indexPath.row];
- }
- NSLog(@"Cell Text :%@",cell.textLabel.text);
- return cell;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement