     }
 
 }
-
-@objc extension FormController {
-
-    func donePressed() {
-        resignResponders()
-    }
-
-    func nextTextField() {
-        let nextIdx = responders.index(of: currentResponder!)! + 1
-        responders[nextIdx].becomeFirstResponder()
-    }
-
-    func previousTextField() {
-        let previousIdx = responders.index(of: currentResponder!)! - 1
-        responders[previousIdx].becomeFirstResponder()
-    }
-
-}

public extension FormController {

    func resignResponders() {
        for responder in responders {
            responder.resignFirstResponder()
        }
    }

    func accessoryViewForResponder(responder: UIResponder) -> UIView {
        let previousButton = UIBarButtonItem(title: "Prev", style: .plain, target: self, action: #selector(previousTextField))
        if let idx = responders.index(of: responder) {
            previousButton.isEnabled = idx > 0
        } else {
            previousButton.isEnabled = false
        }
        let nextButton = UIBarButtonItem(title: "Next", style: .plain, target: self, action: #selector(nextTextField))
        if let idx = responders.index(of: responder) {
            nextButton.isEnabled = idx < responders.count - 1
        } else {
            nextButton.isEnabled = false
        }

    }

    public func textFieldShouldReturn(_ textField: UITextField) -> Bool {
        let idx = inputViews.index(of: textField)!
        if idx == inputViews.count - 1 {
            resignResponders()
        } else {
            nextInputView()
        }

        if let delegate = oldTextFieldDelegates[textField], let unwrappedDelegate = delegate, let delegateResponse = unwrappedDelegate.textFieldShouldReturn?(textField) {
