I just added a button on my custom cell
the button "Look at the reviews", what i would like to do is expand or collapse the cell by tapping this button, i also would like to show other labels when the cell expands. For now to know which cell i'm going to tap i created a tag in my cellForRowAt
cell.reviewButton.tag = indexPath.row
cell.reviewButton.addTarget(self, action: #selector(CourseClass2.ReviewButtonTap(_:)), for: .touchUpInside)
and the IBAction
@IBAction func ReviewButtonTap(_ sender: UIButton) {
let index2 = IndexPath(row: sender.tag, section: 0)
}
but i don't know how can i expand or collapse and especially i do not know how to show other elements in the cell when it expands, i already looked around the net but i didn't find useful tutorial, i'm a beginner can someone explain me how to do?