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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:30:43+00:00 2026-05-17T02:30:43+00:00

I saw this post on SO: UISearchBar solid color But no answer was provided.

  • 0

I saw this post on SO: UISearchBar solid color

But no answer was provided.

I would like to know how to apply a solid color to a UISearchBar. I have applied a tintColor but it automatically creates a gradient.

  • 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-17T02:30:43+00:00Added an answer on May 17, 2026 at 2:30 am

    You can override the drawRect for the search bar. By Setting the “UISearchBarBackground” view to an alpha of 0, it will paint it the flat tint color you set. For example, in your App Delegate add this:

    @implementation UISearchBar( CustomBackground )
    - (void)drawRect:(CGRect)rect
    {
        // Find the UISearchBarBackground view and set it's alpha to 0 so we get a "flat"
        // search bar.
        for( UIView *subview in self.subviews )
        {
            if( [subview isKindOfClass:NSClassFromString( @"UISearchBarBackground" )] )
            {
                [subview setAlpha:0.0F];
                break;
            }
        }
    }
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I saw this post which helped answer part of my question however now
I saw this post but mine is slightly different: Rails ActionMailer with multiple SMTP
I saw this post Ruby on Rails - Awesome nested set plugin but I
So I saw this post here and read it and it seems like bulk
I saw this excellent post: http://sqldud.blogspot.com/2009/01/how-to-convert-csv-to-xml-using-c.html I have a csv file with the column
I saw this post on SO already but it still begs the question, at
I saw this post and I want to know if this is possible in
I saw this post but didn't understand if this was the same issue. My
I recently saw someone post this as part of an answer to an SO
I saw this post and tried to copy it but it didn't work -

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.