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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:34:51+00:00 2026-06-15T10:34:51+00:00

I am creating a viewcontroller in this way: UIStoryboard *sb = [UIStoryboard storyboardWithName:@PhotoViewControlleriPhone bundle:nil];

  • 0

I am creating a viewcontroller in this way:

 UIStoryboard *sb = [UIStoryboard storyboardWithName:@"PhotoViewControlleriPhone" bundle:nil];
                                UIViewController *vc = [sb instantiateInitialViewController];

                               vc.view.backgroundColor = [UIColor clearColor];
                               self.modalPresentationStyle = UIModalPresentationCurrentContext;

                               [self presentModalViewController:vc animated:NO];

                               vc.view.frame = CGRectMake(imageView.frame.origin.x, imageView.frame.origin.y + 64, imageView.frame.size.width, 200.000000);

                               vc.view.layer.cornerRadius = 10; // this value vary as per your desire
                               vc.view.clipsToBounds = YES;

The viewcontroller is not full screen, so you can still see the previous one. I want to be able to see it, but lock it. Just like when you use ios facebook sharing, you see the background, but it becomes darker and you can’t interact with it. How can I do this?

  • 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-15T10:34:52+00:00Added an answer on June 15, 2026 at 10:34 am

    I believe the problem is that you’re displaying it using -presentModalViewController:animated:. Using that method carries with it some assumptions about the view controller you’re hosting; one of the assumptions it makes (on iPhone-type devices, at least) is that the view controller takes up the entire screen and is opaque.

    To get around this, try adding the modal view controller’s view to the current view controller’s view manually. You’ll need to set the view controller hierarchy up to match the view hierarchy, so your code would look like this:

    [self addChildViewController:vc];
    [self.view addSubview:vc.view];
    

    You’ll need to adjust the incoming view’s frame to position it within its new superview, but that should allow you more freedom.

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

Sidebar

Related Questions

I'm creating a custom ViewController. This VC needs to load some data that is
I'm creating an UIViewController in IB. And I want to use this controller with
Is there any way to access this without creating a new instance? As I
(creating a separate question after comments on this: Javascript redeclared global variable overrides old
I have a viewController (Planner) that loads two view controllers (InfoEditor and MonthlyPlan) when
I'm familiar with the idea of creating a new viewcontroller and pushing it onto
In my application, I have two View Controllers - a UIViewController and UITableViewController. Now,
I'm implementing a login system. LoginViewController handles the View (duh!) for this system, LoginSession
I am creating a quiz app that uses a ViewController named QuestionViewController to load
I am creating a view controller that is pushed to the UINavigationController . I

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.