mindz-eye / MYTableViewIndex

A pixel perfect replacement for UITableView section index, written in Swift
MIT License
523 stars 52 forks source link

Custom StringItem doesn't work #4

Closed alexanderkhitev closed 7 years ago

alexanderkhitev commented 7 years ago

Hello, thanks for this framework!

I have a question when I used the example, the font increases well with standard indexes when I used his index, the font is not increased. How can I fix it?

  fileprivate func setupCustomSectionIndex() {
        let tableViewIndexController = TableViewIndexController(tableView: tableView)
        tableViewIndexController.tableViewIndex.dataSource = self
        tableViewIndexController.tableViewIndex.delegate = self
        tableViewIndexController.tableViewIndex.font = fontManager.lato(.Bold, size: 50)// 11.5
    }

    func indexItems(for tableViewIndex: TableViewIndex) -> [UIView] {
        return sortedContactKeys.map { title -> UIView in // this doesn't work
            let stringItem = StringItem(text: title)
            return stringItem
        }
    }