 
 private let SectionReuseIdentifier = "section"
 
-class SectionViewCell: UITableViewCell {
+class SectionView: UITableViewCell {
 
     let scrollView: UIScrollView = {
         let view = UIScrollView(frame: CGRectZero)

        backgroundColor = UIColor.blueColor()
        autoresizingMask = .FlexibleWidth | .FlexibleHeight
        allowsSelection = false
        registerClass(SectionViewCell.self, forCellReuseIdentifier: SectionReuseIdentifier)
    }
}


    }

    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let view = tableView.dequeueReusableCellWithIdentifier(SectionReuseIdentifier, forIndexPath: indexPath) as SectionView

        // TODO: create only visible cells
        let cells = createCells(indexPath.section)

        for cell in cells {
            view.scrollView.addSubview(cell)
        }

        let width = cells.last?.frame.maxX ?? view.frame.width
        let contentSize = CGSize(width: width, height: view.frame.height - 1) // TODO: scrolling will be disabled by using delegate
        view.scrollView.contentSize = contentSize

        return view
    }
}