Incorrect number of objects getting added to mutable array

后端 未结 2 1203
遇见更好的自我
遇见更好的自我 2020-12-21 06:42

I have a view controller with table view that contains 8 cells(sections).I have created a textField and added that text field as a subview to 6 cells,remaining 2 cells of wh

2条回答
  •  情深已故
    2020-12-21 07:26

    Did you try scrolling the tableview? I

    If you have added this code inside if( cell == nil ), then it may not create all the text fields, as the table cells are reused. Better you have different cell identifiers for all the 8 cells. That would solve your problem.

提交回复
热议问题