小编典典

How can I force my keyboard to be up on my program's start in Swift?

swift

I want the keyboard to go up as the app is starting and starting typing into
the text field that I have.


阅读 283

收藏
2020-07-07

共1个答案

小编典典

In your viewDidAppear method, add the following:

txtField1.becomeFirstResponder()

For more information about UIResponder‘s becomeFirstResponder(), check
the
documentation
.

2020-07-07