当前位置: 首页 > 面试题库 >

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

宋和颂
2023-03-14
问题内容

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


问题答案:

In your viewDidAppear method, add the following:

txtField1.becomeFirstResponder()

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

.



 类似资料:

相关阅读

相关文章

相关问答