在 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;
我创建了一个文本字段。它工作正常,但我不能在文本字段上放置文本。文本字段是可见的,但我可以在文本字段下的视图中绘制!
有小费吗?
最好的问候安德烈亚斯