nghialv / Hakuba

:cherry_blossom: Cellmodel-driven tableview manager
MIT License
474 stars 40 forks source link

dynamicHeightEnabled has a problem #42

Open bijy opened 8 years ago

bijy commented 8 years ago

if i delete delay(1.5) {} , dynamicHeightEnabled has a problem code:
let longTitle1 = "Don't have to write the code for UITableViewDelegate and UITableViewDataSource protocols" let longTitle2 = "Support dynamic cell height from ios7"
let titles = ["title 1", "title 2", "title 3", "title 4", "title 5", longTitle1, longTitle2]

    let centerCellmodels = titles.map { [weak self] title -> CellModel in
        let data = CustomCellModel(title: "Section 1: " + title) { _ in
            print("Did select cell with title = \(title)")
            self?.pushChildViewController()
        }
        data.dynamicHeightEnabled = true
        return data
    }

        centerSection
            .append(centerCellmodels)
            .bump(.Left)