Swift UIAlertController Getting Text Field Text

前端 未结 2 607
我寻月下人不归
我寻月下人不归 2021-01-13 09:30

I need to get the text from the text fields in my alert view when the Input button is pressed.

func inputMsg() {

    var points = \"\"
    var outOf = \"\"
         


        
2条回答
  •  情歌与酒
    2021-01-13 10:03

    The UIAlertController has a textFields property. That's its text fields. Any of your handlers can examine it and thus can get the text from any of the text fields.

提交回复
热议问题