【问题标题】:iPhone Keyboard Next ButtoniPhone 键盘下一个按钮
【发布时间】:2010-10-04 00:22:25
【问题描述】:

如何使用 iPhone 键盘左下方的下一步按钮(完成按钮)?

【问题讨论】:

    标签: iphone button iphone-softkeyboard


    【解决方案1】:

    如果我理解了这个问题。

    Here是解决方案


    来自链接的代码片段:

    - (BOOL)textFieldShouldReturn:(UITextField *)textField {
        if (textField == field1TextField) {
            [textField resignFirstResponder];
            [field2TextField becomeFirstResponder];
        } 
        else if (textField == field2TextField) {
            [textField resignFirstResponder];
            [field3TextField becomeFirstResponder];
        }
        else if (textField == field3TextField) {
            [textField resignFirstResponder];
        }
        return YES;
    }
    

    【讨论】:

    • 对于那些看到这个的人,请记住 -(BOOL) 方法是在您以编程方式创建 UITextField 时使用的。如果您已从库中创建了 TextField,您可能希望为 TextField 创建一个 -(IBAction)。将操作链接到相应的 TextField 时,选择 Did End On Exit,其他所有内容都只需从网站复制即可。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-15
    • 1970-01-01
    • 1970-01-01
    • 2012-05-31
    • 1970-01-01
    • 2016-04-18
    相关资源
    最近更新 更多