Skip to content

danielinoa/TextFieldsTraversalController

Repository files navigation

TextFieldsTraversalController

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.

CI Swift Package Manager

Usage

import TextFieldsTraversalController

let textFieldsTraversalController = TextFieldsTraversalController(textFields: textFields)

To run the example project, clone the repo and open Example/TextFieldsTraversalController.xcodeproj.

Customization

textFieldsTraversalController.accessoryView.orientation = .horizontal

image

textFieldsTraversalController.accessoryView.orientation = .vertical

image

The arrow buttons are disabled automatically at the first and last enabled text fields.

previous disabled

next disabled

Requirements

  • iOS 18.0+
  • Swift 6.3+
  • Xcode 26.6+ or another toolchain that supports Swift 6.3

Installation

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")

Author

License

TextFieldsTraversalController is available under the MIT license. See the LICENSE file for more info.

About

A controller that manages focus and traversal for a collection of textfields.

Topics

Resources

License

Stars

15 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors

Languages