Skip to content

How to get indexPath for the customizeTableViewCell #42

@sahibhussain

Description

@sahibhussain

i want to add image for each cell in tableview of suggestion-row i can add a single image by calling cell.imageView but if i want to put different image in each cell please Help

           row.cell.customizeTableViewCell = { (cell, index) in
                print(row.cell.tableView?.indexPath(for: cell) ?? "not found")
                print(index)
                cell.imageView?.image = UIImage(named: "correct.png")
//                let index = cell.ind
            }

i even edited the class to insert index but for some reason it print 1 everytime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions