I have a tableview with 2 sections.
Section 1 has 1 row
Section 2 has either 1 or 2 rows depending on an integer
I tried something really simple, which should really work. But it doesn’t:
if(section == 0)
return 1;
else
if(numberOfRows == 2)
return 2;
else
return 1;
For now I will return 2 rows, no matter numberOfRows value.
Also, when I tried the exact same code but with curly brackets, it didn’t work. How weird is that?
Please try writing it this way:
I am proposing this based on your condition that you only have 2 sections not more.