-2

I am coding a tableview with users posts to display. I am currently trying to break it into to sections to where the first section consist of the posts by users and the second section consists of a spinner cell that loads more posts. I keep getting a small error in my code shown here. Unresolved Error If anyone can explain why I am getting this issue when I have never had this issue when running similar code. Thank you.

2 Answers2

1

I'm not quite sure what you are asking but I think I still might be able to help. I am currently working on a project with a table view also. I would try creating a variable or some other data type that contains the specific cells you want to be in that section. I would use indexPath.row to add these cells to that variable. I would then try running an if statement with that variable that contains those specific cells and then running the code based on that.

Leo Marcinkus
  • 78
  • 1
  • 7
1
If indexPath.section == 0 {
...
}
Ravinder Kumar
  • 7,407
  • 3
  • 28
  • 54
Blazej SLEBODA
  • 8,936
  • 7
  • 53
  • 93