The number in your cell can be changed. I guess you want to get it directly from the cell. You can construct the NSIndexPath yourself. I assume that the data you want to retrieve is in section 0, and there are numCount rows in total, and the numbers are placed in numLable:
var numString = ""
for i in 0 ..< numCount {
numString += tableView.cellForRowAtIndexPath(NSIndexPath(forRow: i, inSection: 0)).numLable.text
}
If the design is reasonable, the data of each cell is encapsulated in the model, so it can be taken directly from the model
Generally, the data in the cell will be placed in an array, which can be obtained directly by processing the array
The number in your cell can be changed. I guess you want to get it directly from the cell. You can construct the NSIndexPath yourself. I assume that the data you want to retrieve is in section 0, and there are numCount rows in total, and the numbers are placed in numLable: