View UITextField不工作

View UITextField不工作,view,textfield,manual,View,Textfield,Manual,在TabBar应用程序中,我在视图上有一个小的,我可以在其中绘制。工作完美 使用该代码: UITextField * textFieldRounded = [[UITextField alloc] initWithFrame:CGRectMake(10, 45.0, 260.0, 50)]; textFieldRounded.borderStyle = UITextBorderStyleRoundedRect; textFieldRounded.textColor = [UIColor blac

在TabBar应用程序中,我在视图上有一个小的,我可以在其中绘制。工作完美

使用该代码:

UITextField * textFieldRounded = [[UITextField alloc] initWithFrame:CGRectMake(10, 45.0, 260.0, 50)];
textFieldRounded.borderStyle = UITextBorderStyleRoundedRect;
textFieldRounded.textColor = [UIColor blackColor]; //text color
textFieldRounded.font = [UIFont systemFontOfSize:17.0];  //font size
textFieldRounded.placeholder = @"<enter text>";  //place holder
textFieldRounded.backgroundColor = [UIColor whiteColor]; //background color
textFieldRounded.autocorrectionType = UITextAutocorrectionTypeNo;   // no auto correction support

textFieldRounded.keyboardType = UIKeyboardTypeDefault;  // type of the keyboard
textFieldRounded.returnKeyType = UIReturnKeyDone;  // type of the return key

textFieldRounded.clearButtonMode = UITextFieldViewModeWhileEditing; // has a clear 'x' button to the right

textFieldRounded.userInteractionEnabled = YES;

[skizzenFeldOutlet addSubview:textFieldRounded];

textFieldRounded.delegate = self;   
我创建了一个文本字段。它工作正常,但我不能在文本字段中输入文本。文本字段可见,但我可以在文本字段下的视图中绘制

有什么建议吗

致意 安德烈亚斯因为这个

[skizzenFeldOutlet addSubview:textFieldRounded]

您的文本字段已平铺添加到视图中