Skip to content

NumberPicker loads very slowly when it calls from UITableView Delegate method #7

Description

@arishanapalli

NumberPicker loads very slowly when the action is call from didselectedRotAt

    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        tableView.deselectRow(at: indexPath, animated: true)
        switch (indexPath.row) {

        case 2:
            do {
                loadNumberPicker()
                break
            }
func loadNumberPicker(){

  let numberPicker = NumberPicker(delegate: self, maxNumber: 100)
        numberPicker.bgGradients = secondGradientColors
        numberPicker.tintColor = .white
        numberPicker.heading = “Select Your Value”
        numberPicker.defaultSelectedNumber = 0
        self.tabBarController?.present(numberPicker, animated: true, completion: nil)
}

Same method calling from button action its appears very quickly, not when calling it from UITableView didSelectRowAt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions