How can I loop through UITableView's cells?

前端 未结 8 1061
时光说笑
时光说笑 2020-12-07 13:04

I have n sections (known amount) and X rows in each section (unknown amount. Each row has a UITextField. When the user taps the \"Done\" button I want to iterate through eac

8条回答
  •  醉梦人生
    2020-12-07 13:53

    Here is a nice swift implementation that works for me.

     func animateCells() {
            for cell in tableView.visibleCells() as! [UITableViewCell] {
                //do someting with the cell here.
    
            }
        }
    

提交回复
热议问题