Skip to content

A natural language form for iOS that only uses UITextView and UITextField

Notifications You must be signed in to change notification settings

widescape/NaturalLanguageForm

Repository files navigation

NaturalLanguageForm

Natural language form using UITextView and UITextField

Solution for http://stackoverflow.com/questions/25952168/put-uilabel-uitextfield-on-next-line-instead-of-pushing-out-of-view

Instructions

  • Create a selectable, non-editable UITextView for the full text which will also contain the entered parameter values.
  • Add an editable UITextField for each parameter that can be entered.
  • Upon entering/changing a parameter the active UITextField will be reduced to the width of the caret and placed at the last character's position within the UITextView's dimensions.

Features

  • Works with resizeable UITextView
  • Works with AutoLayout

Things To Do

  • Handle text selection:
    • Prevent the selection of the text around the input values within the UITextView
    • Allow selection of the input values within the UITextView, then select that range in the UITextField
  • Display the caret at the actual position within the input value
  • Support multiple parameters
  • Editing an existing value (create link actions in the attributed string)

About

A natural language form for iOS that only uses UITextView and UITextField

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published