如何在iOS中为UITextFields实现自定义键盘

时间:2015-10-08 05:02:04

标签: ios uitextfield

Image Link

如何在iOS中为UITextFields实现自定义键盘,如上图所示

其实我是这样尝试的

- (IBAction)button2ABC:(id)sender
{
    keypadValue=@"2";
    if ([textFields_tag isEqualToString:@"one"]){
        pswdTxt1.text=keypadValue;
        pswdTxt1.text=[keypadValue  stringByAppendingString:keypadValue];
    }
    else if ([textFields_tag isEqualToString:@"two"]){
        pswdTxt2.text=keypadValue;
    }
    else if ([textFields_tag isEqualToString:@"three"]){
        pswdTxt3.text=keypadValue;
    }
    else if ([textFields_tag isEqualToString:@"four"]){
        PswdTxt4.text=keypadValue;
    }
}

每当我选择UITextfield该字符正在替换而不附加前一个字符时按下按钮。

0 个答案:

没有答案