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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:55:04+00:00 2026-06-07T11:55:04+00:00

I want to mimic what seem to be the standard UI for using the

  • 0

I want to mimic what seem to be the standard UI for using the UISearchBar, and right now I trying to make the rest of the view gray, when I begin searching, and I tried doing that by just setting the background color of the view to gray, but I am using sections in my UITableView, and they are not turning gray. Anybody have any reasons why that is?

UITableView when using searchbar

  • 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-06-07T11:55:07+00:00Added an answer on June 7, 2026 at 11:55 am

    The reason you’re not seeing the section headers fade to gray is because they are drawn on top of the gray background, and are opaque; in other words, their alpha is 1.

    If you’re looking for a suggestion to get the effect you want, my first reflex would be to add an overlay UIView as a subview of the area you want to be “grayed out”, and change its background color when certain events occur. Something like this:

    // You have to choose what view is the one that needs to be grayed out.
    // I'll call the view you want to gray out "viewToBeGrayed"
    
    UIView *grayOverlay = [[UIView alloc] initWithFrame:viewToBeGrayed.frame];
    
    // Initially, the overlay should be clear
    [grayOverlay setBackgroundColor:[UIColor clearColor]];
    
    [viewToBeGrayed addSubview:grayOverlay];
    

    Then, when you want to “gray out” viewToBeGrayed, just change the background color of grayOverlay to some translucent gray value:

    [grayOverlay setBackgroundColor:[UIColor colorWithWhite:0.5 alpha:0.5]];
    

    Finally, when you want to get rid of the “grayed out” effect, just set the view back to clear:

    [grayOverlay setBackgroundColor:[UIColor clearColor]];
    

    That should be a good place to start. Comment if you need any additional help.

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

Sidebar

Related Questions

I am trying to mimic template behavior in C++ using macros. For instance, if
I want to mimic a Python functionality in Java. In Python if I want
I want to mimic the trim behavior of Photoshop (crop the area that is
i want to mimic the folder animation. is there an open source library which
I have a slideshow built in flash that I want to mimic in jQuery.
I want to draw some listview items disabled and would like to mimic the
I need to mimic the preprocessor feature of C with Python. If I want
want to know why String behaves like value type while using ==. String s1
How do I mimic an HTTPServletRequest and HTTPServletResponse object. The reason is I want
I couldn't seem to get my CSS working properly in IE (I'm using IE

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.