Ios 当我们点击UItextfield时,它不可编辑

Ios 当我们点击UItextfield时,它不可编辑,ios,objective-c,uitableview,uitextfield,uitableviewsectionheader,Ios,Objective C,Uitableview,Uitextfield,Uitableviewsectionheader,您好,我是ios新手,在我的应用程序中,我添加了UITableList,在这里,我添加了UIViewxib文件到tableListHeaderView 在这里,我在UIViewxib文件中添加了一个UItextfield,当我单击该textfield时,它是不可编辑的,我的意思是单击操作不起作用请帮助我一些 我的代码:- 您可以通过以下任何一种方式来实现这一点 header.coridersTextfield.editable = YES; // or header.coridersTex

您好,我是ios新手,在我的应用程序中,我添加了UITableList,在这里,我添加了
UIView
xib
文件到
tableList
HeaderView

在这里,我在
UIView
xib
文件中添加了一个
UItextfield
,当我单击该
textfield
时,它是不可编辑的,我的意思是
单击操作不起作用
请帮助我一些

我的代码:-
您可以通过以下任何一种方式来实现这一点

header.coridersTextfield.editable = YES;
// or 

 header.coridersTextfield.userInteractionEnabled = YES;

// or 

  header.coridersTextfield. enabled = YES;
或者使用委托方法

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
return YES;
}
更新

UIView *HeaderView = [[UIView alloc] init];
HeaderView.frame = CGRectMake(x,y, width, height); // customize frame and set the Height based on your Subviews Height

HeaderView的边界为(x:0,y:0,宽度:0,高度:0)

请执行以下操作:

UIView *HeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGrectGetWidth(tableView.bounds), 44.0f)];

选择textView并选中属性检查器。可能是这样


header.coridersTextfield.editable=是;如何设置can u post代码?启用或禁用
标题
用户交互后检查not@AbhiRam--您无法分配
HeaderView
的帧,设置帧并重试一次,您将所有子视图添加到
HeaderView
没有用还是没有用,我可以发送我的示例x代码文件吗?一旦它变小,请查看。您可以向我们展示您的textfieldLet连接检查器吗。
UIView *HeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGrectGetWidth(tableView.bounds), 44.0f)];