简体   繁体   中英

Swift: How to remove default auto first responder assignment

The app automatically assigns the first control in the document outline to the first responder automatically after the app launch (See reset button in the screenshot below).

在此处输入图片说明

I did not assign any control to be the first responder in my code. How to disable this behavior using swift?

I have referred and tested some Objective-C methods about resigning first responder but no effect.

Any hint or comment is appreciated and thanks for your time viewing this question.

After a day of investigation, I finally realize that it is my own problem. The button is auto-focused because I turned on the full keyboard access on my Mac (See screenshot below). It behavior commonly after I set it to the Text box and lists only .

在此处输入图片说明

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