I need to have a view which has a UITableView
and the main UITableView
has a cell that has another tableview.
I have added the view on storyboard and implemented the delegate and datasource methods in a single viewcontroller.
But the tableview methods are not getting called for the inner tableview since i have set inner tableview delegate and datasource like this:
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell: UITableViewCell = UITableViewCell()
switch tableView.tag {
case 1:
if indexPath.section == 0 {
let pendingReportsCell = tableView.dequeueReusableCellWithIdentifier("PendingReportsCell") as! PendingReportsTableViewCell
pendingReportsCell.taxYearTableView.delegate = self
pendingReportsCell.taxYearTableView.dataSource = self
taxTableView = pendingReportsCell.taxYearTableView
taxTableView?.registerClass(UITableViewCell.self, forCellReuseIdentifier: "EarliestMonthTaxYearCell")
tableView.tag = (taxTableView?.tag)!
taxTableView?.reloadData()
}
Please tell me an alternate to do this.