0

TabBar-Application では、ビューに小さなビューがあり、そこに描画できます。完璧に動作します。

そのコードで:

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;   

テキストフィールドを作成します。うまくいきますが、テキストフィールドにテキストを入れることができません。テキストフィールドは表示されていますが、テキストフィールドの下のビューに描画できます!

任意のヒント?

よろしくアンドレアス

4

1 に答える 1

0

このため。

[skizzenFeldOutlet addSubview:textFieldRounded];

あなたの textField はあなたのビューにフラットに追加されています。

于 2012-10-24T05:38:27.627 に答える