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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:09:04+00:00 2026-06-13T08:09:04+00:00

I have two UIViews , both of which obviously have CGRects each. One UIView

  • 0

I have two UIViews, both of which obviously have CGRects each. One UIView fills the screen whereas the other just fills part of it in the middle. I have the CGRect of the smaller UIView, but how can I get the CGRect of the one outside of it – excluding the size of the smaller one so that the background can be dimmed, but not the content of the inner UIView?

This is what my UIViewController looks like so you can get a better idea of what I’m trying to do:

enter image description here

I want to dim the outer UIView, not the inner one – but I don’t have the CGRect of the outer one excluding the inner UIView so I’ve had to do it the other way around for now.

  • 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-13T08:09:05+00:00Added an answer on June 13, 2026 at 8:09 am

    A CGRect is a square size. If you want to know the outer aria you need to compute 4 CGRects. The top, left, right and bottom space.

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

Sidebar

Related Questions

I am bit stack with creating two UIViews which are switchable (each UIView has
I currently have two UIViews: one of a red background and the other blue.
I have two UIViews. I'm using one to contain the other so that I
I have a two UIViews filled with UIButtons. I want to only allow one
I have one (1) .xib with two UIViews, one on the top 1/3, the
I need to have two UITableViews on one UIView. I can make it work
I have a UIView container that has two UIImageView s inside it, one partially
I have two classes (MVC view model) which inherits from one abstract base class.
I have two view controllers, one of them is a subview of the other.
I have the following code in two different classes (both subclasses of UIView). In

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.