If your tableView uses the bdAccount array as input for the number of sections, row, and data for cellForRowAtIndexPath, it's just that.
override func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return bdAccount.count } override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath)
If you now call the tableView.reloadData () method, it reloads the entire tableView and, since it is based on your array, where you just deleted one entity, this object will also disappear from tableView.
Emptyless
source share