Tag: bemsimplelinegraph

将多个原型单元加载到UITableView中

我目前有一个UITableView包含2行的自定义单元格。 我最近添加了第二个原型单元格到我的故事板,并试图将其添加到我的UITableView没有成功。 我的cellForRowAtIndexPAth方法如下: func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell: FlightsDetailCell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as FlightsDetailCell cell.userInteractionEnabled = false if indexPath.section == 0 { 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 } if […]