A controller to manage the traversal of a collection of text fields.
This controller comes with a custom inputAccessoryView that mimics the one used by Safari when traversing through an HTML form.
import TextFieldsTraversalController
let textFieldsTraversalController = TextFieldsTraversalController(textFields: textFields)To run the example project, clone the repo and open Example/TextFieldsTraversalController.xcodeproj.
textFieldsTraversalController.accessoryView.orientation = .horizontal
textFieldsTraversalController.accessoryView.orientation = .vertical
The arrow buttons are disabled automatically at the first and last enabled text fields.
- iOS 18.0+
- Swift 6.3+
- Xcode 26.6+ or another toolchain that supports Swift 6.3
Add this repository as a package dependency in Xcode or in Package.swift:
.package(url: "https://github.com/danielinoa/TextFieldsTraversalController.git", from: "2.0.0")TextFieldsTraversalController is available under the MIT license. See the LICENSE file for more info.







