Swiftpack.co -  LudvigSahlin/InputFieldCommunity as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
This package is used to handle common logic for views with multiple input fields.
.package(url: "https://github.com/LudvigSahlin/InputFieldCommunity.git", from: "0.1.0")


This package is used to handle common logic for views with multiple input fields:

  • When the return key is tapped, next input field (if any) will become first responder.
  • When autofill is detected, the next input field (if any) will become first responder.
  • Handles visibility of custom clear button.


  • The custom autofill detection is not fully reliable and might break with future releases.
  • UITextView is not handled.
  • All input fields will have their delegate set to their InputFieldNeighborhood. Thus, if you try to set the delegate of a text field in a InputFieldNeighborhood, it will either get overridden or you will break the functionality of the InputFieldNeighborhood.


You only specify the relationship between the different UI components: private var community: InputFieldCommunity!

community = InputFieldCommunity([
    InputFieldNeighborhood(containerView: givenNameContainerView, backgroundView: givenNameBackgroundView, inputField: givenNameTextField, headerLabel: givenNameHeaderLabel, xImageView: givenNameXImageView, xBackgroundView: givenNameXBackgroundView),
    InputFieldNeighborhood(containerView: familyNameContainerView, backgroundView: familyNameBackgroundView, inputField: familyNameTextField, headerLabel: familyNameHeaderLabel, xImageView: familyNameXImageView, xBackgroundView: familyNameXBackgroundView),
    InputFieldNeighborhood(containerView: plateNumberContainerView, backgroundView: plateNumberBackgroundView, inputField: plateNumberTextField, headerLabel: plateNumberHeaderLabel, xImageView: plateNumberXImageView, xBackgroundView: plateNumberXBackgroundView),


The contents of this repository is licensed under the Apache License, version 2.0.




Stars: 0
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics