I was making this table view inside my view controller. The table view was going to have a set of buttons. Now I have an array which contains labels for those buttons, but t
Try this -
[btnProblem setTitle:[btnLabels[indexPath.section] forState:UIControlStateNormal];
instead of this -
[btnProblem setTitle:[btnLabels[indexPath.row] forState:UIControlStateNormal];
As there are only one row in each section, to access array's object use section number. p.s also uncomment the above line of code.