unc tableView(tableView: UITableView, cellForRowAtIndexPath indexPath:
NSIndexPath) -> UITableViewCell {
cell.userInteractionEnabled = false
if indexPath.section == 0 {
let cell: FlightsDetailCell = tableView.dequeueReusableCellWithIdentifier
("Cell", forIndexPath: indexPath) as FlightsDetailCell
cell.graphView.enableBezierCurve = true
cell.graphView.enableReferenceYAxisLines = true
cell.graphView.enableYAxisLabel = true
cell.graphView.colorYaxisLabel = UIColor.whiteColor()
cell.graphView.delegate = UIApplication.sharedApplication().delegate as
BEMSimpleLineGraphDelegate
cell.graphView.dataSource = UIApplication.sharedApplication().delegate as
BEMSimpleLineGraphDataSource
return cell
}
else if indexPath.section == 1 {
let cell: FlightsDetailCell = tableView.dequeueReusableCellWithIdentifier
("Cell", forIndexPath: indexPath) as FlightsDetailCell
cell.graphView.enableBezierCurve = true
cell.graphView.enableReferenceYAxisLines = true
cell.graphView.enableYAxisLabel = true
cell.graphView.colorYaxisLabel = UIColor.whiteColor()
cell.graphView.delegate = self
cell.graphView.dataSource = self
return cell
}
else {
let cell2: FlightsInformationCell = tableView.dequeueReusableCellWithIdentifier
("Cell2", forIndexPath: indexPath) as FlightsInformationCell
cell2.userInteractionEnabled = false
return cell2
}