My view controller display the view depends on an array. the object of the array may be removed according to user interaction. So i have to reload the view controller once the user delete data in the array. is there any way to reload the regular view controller?
Asked
Active
Viewed 566 times
1 Answers
0
You should design the view according to the array in one method and call it every time the array changes.
private func setupView() {
...
self.setNeedsLayout()
}
private func deleteObject() {
myArray.removeAtIndex(2)
self.setupView()
}

Franco Meloni
- 156
- 5