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

The Archive Base Latest Questions

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

I have a view that is slightly translucent, I set the alpha to about

  • 0

I have a view that is slightly translucent, I set the alpha to about .75 and it contains a button as a sub element.
I want the button to be completely opaque and I set the opaque property in IB but still the button appears as translucent.

Any pointers?

Thanks!

  • 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-07T15:02:57+00:00Added an answer on June 7, 2026 at 3:02 pm

    A subview of a superview is allways minimum as transparent as its subview.

    Subview alpha = 0.5 and superview alpha = 0.1 would result in an alpha of the subview of 0.05.

    The only way of achieving that is changing the view hierarchy. Your subview must not be a subview any more. It may still be at the same position. (May require different position value).

    An example.
    Your background view is backgroundView
    Your superview is firstView
    Your subview is overlayView

    Your current hierarchy is

    backgroundView -> firstView -> overlayView
    

    You should change that to:

    backgroundView -> first View
                  \-> overlay View. 
    

    If your firstView’s position is (10, 10) and your overlayView’s position was (20,20) then change your overlayView’s position to (30,30) because it now is within the coordinate system of background view.

    For your code:
    At some point you used to have

    [backgroundView addSubView:firstView];
    [fisrtView addSubView:overlayView];
    

    change that to

    [backgroundView addSubView:firstView];
    [backgroundView addSubView:overlayView];
    

    If you did not code that but defined it within IB then just move overlayView within the views tree accordingly so that it is on the same level as firstView.

    Regardless whether you code it or draw it in IB, make sure that firstView comes first and overlayView comes next. Otherwise firstView could hide overlayView when its alpa is greater than 0.

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

Sidebar

Related Questions

I have a view that has a tooltip attribute. I want to set that
I have UIScrollView in my view. Problem is that if I slightly scroll it
I have a View that contains a ParentModel, which contains 2 Models. I only
I am beginner in rails. I have view that i try to print inside
I have a view that has a column to make it sortable. When clicking
I have a view that renders a list elements using the following template :
I have a view that shows user profile fields in a tabular format. There
I have a view that is used in a UINavigationController and and is automatically
I have a View that is basically setup like this: <Grid> <ViewBox> <Grid> <ItemsControl
I have a view that could be called from any of 3 actions from

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.