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

  • SEARCH
  • Home
  • 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 4611172
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:13:56+00:00 2026-05-22T01:13:56+00:00

My UITextField’s font gets lighter when it is being edited, and bolder whenever editing

  • 0

My UITextField’s font gets lighter when it is being edited, and bolder whenever editing finishes. These images should illustrate the problem:

Editing
Not Editing

Can anyone explain why this is, and how to stop it?

This is all the code I’ve got for it – first my UITextField subclass (which is just there to add margins):

@interface RLTextField : UITextField {    
}
@end

@implementation RLTextField

- (CGRect)editingRectForBounds:(CGRect)bounds
{
    CGRect editingRect = CGRectMake(bounds.origin.x+35, bounds.origin.y-5, bounds.size.width, bounds.size.height);
    return editingRect;
}

- (CGRect)textRectForBounds:(CGRect)bounds
{
    CGRect editingRect = CGRectMake(bounds.origin.x+35, bounds.origin.y-5, bounds.size.width, bounds.size.height);
    return editingRect;
}
@end

And then where it’s actually added in my viewController:

- (void)viewDidLoad
{   
    CGRect noteTitleTextFrame  = CGRectMake(self.view.bounds.origin.x, 
                                            self.view.bounds.origin.y+10, 
                                            self.view.bounds.size.width, 
                                            44);
    RLTextField *textField = [[RLTextField alloc] initWithFrame:noteTitleTextFrame];
    self.nameTextField = textField; [textField release];
    self.nameTextField.delegate = self;
    self.nameTextField.borderStyle = UITextBorderStyleNone;    
    self.nameTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentBottom;
    self.nameTextField.font = [UIFont fontWithName:@"Courier" size:21];
    [self.view addSubview:self.nameTextField]; 
}
  • 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-22T01:13:56+00:00Added an answer on May 22, 2026 at 1:13 am

    checked your code…. and there only one word for that WTF….!
    I don’t know what’s wrong with that but there is a solution for that and it’s

    self.nameTextField.font = [UIFont fontWithName:@"Courier New" size:21];
    

    just change the font name. This will work.. cheers 🙂
    By the way you probably found a bug or may be not that’s why apple has added “Courier New”.
    I don’t know…

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

Sidebar

Related Questions

I've got a UITextField with clearButton property set to while editing. The textfield is
This UITextField delegate method is not being called even I changed the text in
countryField=[[UITextField alloc]initWithFrame:CGRectMake(0,0,100,25)]; countryField.textColor = [UIColor blackColor]; countryField.font = [UIFont systemFontOfSize:15.0]; countryField.backgroundColor = [UIColor redColor];
I am creating a UITextField programmatically and placing it inside a UIView. The font
I have a UITextField with number pad keyboard and on Editing Changed event I
I have a UITextField that I put into a UITableViewCell that I put into
I have a UITextField but when it overflows I want it to scroll not
I created a UITextField in code, now I have now idea how to define
I have a UITextField in my app that accepts decimal amounts for prices (i.e.,
How to put a UITextField inside of a UITableViewCell (grouped)? I want a user

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.