Eureka: Scrolling issue after keyboard disappearing

Created on 5 Oct 2016  路  4Comments  路  Source: xmartlabs/Eureka

I have simple form. Scroll view is working wrong when I'm trying to disappear keyboard. I've captured video: https://vimeo.com/185622255

Eureka revision: https://github.com/xmartlabs/Eureka/commit/29e73c3a2196732de0acac136e911143290390cf
XCode Version 8.0 (8A218a)
Video captured from Simulator Version 10.0 (SimulatorApp-700.5.3 CoreSimulator-303.8)
Issue already reproduces on devices with iOS 10.0, 9.3.1.

I'm pretty sure it's related to this issue: https://github.com/xmartlabs/XLForm/issues/460

Code:

override func viewDidLoad() {
    super.viewDidLoad()

    form
        +++ Section() { section in
        }
        <<< ButtonRow() { row in
            row.tag = "Sign In"
            row.title = "If you already have an account, Sign in".localized()
            row.onCellSelection({ (cell, row) in
                row.deselect()
                self.onSignInButtonTap()
            })
        }
        +++ Section() { section in
        }
        <<< NameRow() { row in
            row.tag = "First Name"
            row.title = "First Name".localized()
            row.cell.textField.bnd_text.bindTo(self.bnd_firstName)
            }.cellUpdate { (cell, row) in
                cell.textField.textAlignment = .Left
        }
        <<< NameRow() { row in
            row.tag = "Last Name"
            row.title = "Last Name".localized()
            row.cell.textField.bnd_text.bindTo(self.bnd_lastName)
            }.cellUpdate { (cell, row) in
                cell.textField.textAlignment = .Left
        }
        <<< EmailRow() { row in
            row.tag = "Email"
            row.title = "Email".localized()
            row.cell.textField.bnd_text.bindTo(self.bnd_email)
            }.cellUpdate { (cell, row) in
                cell.textField.textAlignment = .Left
        }
        <<< TextRow() { row in
            row.tag = "Password"
            row.title = "Password".localized()
            row.cell.textField.bnd_text.bindTo(self.bnd_password)
            }.cellUpdate { (cell, row) in
                cell.textField.textAlignment = .Left
        }
        <<< SegmentedRow<Currency>() { row in
            row.tag = "Currency"
            row.title = "Currency".localized()
            row.options = Currency.valueArray()
            row.value = Currency.valueArray().first
            row.displayValueFor = { value in
                return value?.symbol()
            }

            let segmentedControl = row.cell.segmentedControl
            segmentedControl.setNeedsUpdateConstraints()
        }
        <<< PhoneRow() { row in
            row.tag = "Phone"
            row.title = "Phone".localized()
            row.cell.textField.bnd_text.bindTo(self.bnd_phone)
            }.cellUpdate { (cell, row) in
                cell.textField.textAlignment = .Left
        }
        <<< ButtonRow() { row in
            row.tag = "Sign Up"
            row.title = "Sign up".localized()
            row.onCellSelection({ (cell, row) in
                row.deselect()
                self.signUpWithFormData()
            })
    }
}
awaiting response question

All 4 comments

I did some testing using master branch (swift 3) and I couldn't reproduce it.

Make sure you properly invoke the super implementation if you have overridden keyboardWillShow , keyboardWillHide.

If you upload a project i can take a deeper look at it.

I will close this issue for now. If you send a project to reproduce the issue i reopen it.

I am having this same issue @AlexEdunov did you end up solving it?

I had the same problem and I was trying to reproduce the issue so I can upload it here, but when I was creating a new project the scroll had no problem! And then I understood why this was happening!

I use IQKeyboardManager to have the same keyboard as eureka has and I thought that those two can't play together, so I stopped it in my particular view (where I use eureka) and the scrolling issue has gone!

I disabled IQKeyboardManager with this line: IQKeyboardManager.sharedManager().enable = false

Of course if you don't have IQKeyboardManager maybe you have another keyboard library that conflicts with eureka's keyboard so try to disable any of your library to the view you have the problem.

Was this page helpful?
0 / 5 - 0 ratings