开发者

Give focus to an control when the App starts in Cocoa

开发者 https://www.devze.com 2023-02-16 15:04 出处:网络
I have multiple TextFiled controls, and can I put a focus on a specific TextField when the App starts?

I have multiple TextFiled controls, and can I put a focus on a specific TextField when the App starts?

EDIT

- (void)awakeFromNib
{
...
    [commandInput becomeFirstResponder];
...开发者_如何学Python
}

works.


yes, use [textfield1 becomeFirstResponder]

0

精彩评论

暂无评论...
验证码 换一张
取 消