Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7000739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:42:39+00:00 2026-05-27T20:42:39+00:00

I am adding a textfield to my view like this: UITextField* tf_email = [[UITextField

  • 0

I am adding a textfield to my view like this:

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 = @"your@email.com";
    [self.view addSubview:tf_email];

When I enter long text in to this field, the text and the clear button overlaps. Does any one know how to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:42:40+00:00Added an answer on May 27, 2026 at 8:42 pm

    I figured what the issue was. In another file, I had a category defined for UITextField. This category, specified the text area to be very close to the left and right border. That was causing the overlap.

    Lesson learnt: When defining categories, we should use separate files so that the modifications are easily detectable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This prints the selected datePicker's date to a textField like this: February 9, 2012
I am dynamically modifying a textfield using Javascript by adding some extra character (say
I have a UITextField which I am adding programmatically. I want to set the
I have a text field entry in my view that I would like to
So, I have the slider adding UITextFields but it's not updating/subtracting UITextField's when selecting
I'm trying to animate adding a new subview to a table view. (When the
I'm adding an array of sprites, each with an associated textfield. When the sprite
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { if (textField.text.length >=8) { return NO; //
In my iPhone APP I have a view with a textfield and a button
I have a modal set up like this: Despite appearances, the first two fields

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.