我有3個UITextField
S的給予如下動態:的UITextField不編輯正確
if(a isEqualtoString:@"1")
{
UITextField *t=[[UITextField alloc]initWithFrame:CGRectMake(20,20,20,20)];
t.text=s;
t.delegale=self;
[scroll addSubview:t];
}
if(a isEqualtoString:@"2")
{
UITextField *t=[[UITextField alloc]initWithFrame:CGRectMake(20,20,20,20)];
t.text=p;
t.delegale=self;
[scroll addSubview:t];
}
if(a isEqualtoString:@"3")
{
UITextField *t=[[UITextField alloc]initWithFrame:CGRectMake(20,20,20,20)];
t.text=r;
t.delegale=self;
[scroll addSubview:t];
}
我的問題是,在這些文本框我寫errT.hidden=YES;
這是我的代碼的didBeginEditing
但我無法編輯這些文本字段,並且我已經給予代理.h
也。該怎麼辦?我已經嘗試了許多對我沒有幫助的解決方案。幫我
UPDATE:
-(void)textFieldDidBeginEditing:(UITextField *)textField{
if(textField==t)
{
err.hidden=YES;
}
}
顯示didbeginEditing – BhushanVU 2013-03-21 10:57:31
請說明你是不是能夠編輯文本字段值或didbegin編輯方法不是叫 – iSanjay 2013-03-21 11:01:21
代碼didbeginediting – Kasaname 2013-03-21 11:01:23