1

Hello I am working on swift. I want to delete a row from tableView. The problem is that there is no option of remove object from an array is coming in autosuggestion. is there any other method apple has introduced to delete a row. I can't find these two methods removeAtIndex and removeObjectAtIndex. My array datatype is this

 var array = NSArray()

see enter image description here

hellosheikh
  • 2,929
  • 8
  • 49
  • 115

1 Answers1

2

NSArray is immutable so you cannot remove items from it. You have to use NSMutableArray which allows modifications.

Sami Kuhmonen
  • 30,146
  • 9
  • 61
  • 74