What's a simple way to get a text input popup dialog box on an iPhone

后端 未结 12 2053
-上瘾入骨i
-上瘾入骨i 2020-12-02 03:42

I want to get the user name. A simple text input dialog box. Any simple way to do this?

12条回答
  •  [愿得一人]
    2020-12-02 04:36

    Just wanted to add an important piece of information that I believe was left out perhaps with the assumption that the ones seeking answers might already know. This problem happens a lot and I too found myself stuck when I tried to implement the viewAlert method for the buttons of the UIAlertView message. To do this you need to 1st add the delegate class which may look something like this:

    @interface YourViewController : UIViewController

    Also you can find a very helpful tutorial here!

    Hope this helps.

提交回复
热议问题