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 7092533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:19:33+00:00 2026-05-28T08:19:33+00:00

I have a sign in form with inputs that have a white background and

  • 0

I have a sign in form with inputs that have a white background and a red background. Instead of manually changing the backgroundfor each UITextField that has an error, can I extend the UITextField and add some extra functionality to it or is there a better way?

Also, if I do a custom UITextField, is there a way do use that in Interface Builder?

  • 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-28T08:19:34+00:00Added an answer on May 28, 2026 at 8:19 am

    Create a UITextField subclass that implements your features. Then in Interface Builder, whenever you drag a UITextField onto your view, set its class in the Inspector to your UITextField subclass instead.

    You’ll still be able to configure it in IB like a regular UITextField, and it won’t look any different in IB, but when your app is run it will have your custom background color.

    Remember, if you are subclassing a textfield to be used in Interface Builder, you’ll need to implement the initWithCoder or awakeFromNib methods instead of the initWithFrame method, or your custom setup code won’t be run when it’s created by the nib.

    Also, you won’t be able to set any custom properties of your subclass in IB, so if you need a red text field and a blue textfield, you’ll need to create two separate subclasses if you want to use them in IB without needing to set their properties in code.

    UPDATE: It’s no longer true that you can’t set custom properties in IB. You can now use the User Defined Runtime Attributes panel in the Inspector.

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

Sidebar

Related Questions

I have a .NET powered website, that has a sign-up box form already. I'm
I have a sign up form that is displayed to all new site visitors.
I have a bit of jquery that is submitting a email sign up form
I have a sign in form and a lost password form. Currently in my
I have designed one sign-up form,in this form after getting all necessary values I
Have a form that is emailed with checkboxes. Some checkboxes have an optional field
I have a simple email form: <form method=post action=process-form.php id=emailForm name=emailForm target=_self> <h4>Sign up
I have a modal window with a login/sign-up form. I would like to prevent
I have a blog that has a sidebar with a partial view in it
I have a mailing list form to sign up to a mailing list and

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.