Tamarisk
Tamarisk

Reputation: 567

Text input pop-up for adding to tableview

I have a table view list and an add button at the top right. The user would press the button and a text field would pop up for a user to enter a string to be the label of the new item. Nothing new or special, what you'd expect from a "new playlist" type situation.

I am looking to have the small text field input that the user would type into. Most examples have the app move to a new view controller with a text field. I simply want a little box to overlay the current view that accepts a string. I cannot find/remember the name of the text box so I cannot find examples or code.

Upvotes: 0

Views: 979

Answers (1)

FormigaNinja
FormigaNinja

Reputation: 1571

I think you are searching for something like

https://github.com/bmancini55/iOSExamples-DockedKeyboardView

Where your UITextField would be attached on the keyboard's accessory view.

OR

http://nshipster.com/uialertcontroller/

Where you use an UIALertController with an input field. I think the second one will resolve your problem more than the first one, because you are asking for a pop-up solution.

Hope it helps

Upvotes: 1

Related Questions