我添加一個文本框我的看法是這樣的:的UITextField文字重疊清除按鈕
UITextField* tf_email = [[UITextField alloc] initWithFrame:CGRectMake((320-btnImage1.size.width)/2, 170, 175, 35)];
[tf_email setBackgroundColor:[UIColor clearColor]];
[tf_email setBorderStyle:UITextBorderStyleRoundedRect];
[tf_email setClearButtonMode:UITextFieldViewModeWhileEditing];
[tf_email setReturnKeyType:UIReturnKeyDone];
[tf_email setAutocapitalizationType:UITextAutocapitalizationTypeNone];
[tf_email setEnablesReturnKeyAutomatically:NO];
[tf_email setDelegate:self];
[tf_email setOpaque:YES];
tf_email.tag=1;
tf_email.font = TTSTYLEVAR(font);
tf_email.layer.cornerRadius = 10;
tf_email.keyboardType = UIKeyboardTypeEmailAddress;
[tf_email setAutocorrectionType:UITextAutocorrectionTypeNo];
tf_email.placeholder = @"[email protected]";
[self.view addSubview:tf_email];
當我在這個字段中輸入長文本,文本和清除按鈕重疊。有誰知道如何解決這一問題?
請儘量使用標準字體和看到的結果。 – beryllium
沒有區別。 –