Unable to Populate TableView In PopOverController - Objective C

前端 未结 4 505
一生所求
一生所求 2021-01-26 11:59

I have a UIButton called as UploadButton. I am using the following lines of code which takes care of the action which should happen on clicking it ::

4条回答
  •  有刺的猬
    2021-01-26 12:33

    Use the following code in cellForRowAtIndexPath:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
    
        static NSString *CellIdentifier = @"Cell";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    
        // Configure the cell...
    
        if( cell == nil )
        {
            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
        }
    
        NSString *key1 = [keys1 objectAtIndex:indexPath.row];
        cell.textLabel.text = key1;
    
        return cell;
    
    }
    

    I think this may helpful for you.

提交回复
热议问题