简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM