TableView error Assertion Failiure when try to load the data

When you tried to display the array of values in tableView but you got the below error.

Error:
Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]

The first thing you have to check with your tableView.Because if you not connected the delegate and data source to the taableView then you got the above error.

Also if you did not add the table view data source and table view delegate then the above error will come.So add the delegate and data source things like below.


class ViewController: UIViewController, UITableViewDataSource,UITableViewDelegate{

}

Data source and delegate methods are connected from ViewController to tableView like below.



You must have to implement the required delegate methods inside the View Controller.

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift