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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:59:10+00:00 2026-06-13T14:59:10+00:00

There is a basic form, pressing button call method performSegueWithIdentifier which shows the popover

  • 0

There is a basic form, pressing button call method performSegueWithIdentifier which shows the popover window. How could I black out (dim) the main view window until the popover is active?

I’ve tried to use the library SVProgressHUD like this:

- (IBAction)publishButtonAction:(id)sender {
    [SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeBlack];
    [self performSegueWithIdentifier:@"fbshareSigue" sender:self];
    [SVProgressHUD dismiss];
}

Obtained for a split second – until there is a popover-window.

Where must I insert this code, if I try this?:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

    if ([[segue identifier] isEqualToString:@"fbshareSigue"]) {
        OFAFBShareViewController *svc = (OFAFBShareViewController *) [segue destinationViewController];
        UIStoryboardPopoverSegue *popoverSegue = (UIStoryboardPopoverSegue *)segue;
        svc.postBlock = self.postInitBlock;
        [svc setClosePopWindow:[popoverSegue popoverController]];
    }
}

    - (IBAction)publishButtonAction:(id)sender {
        UIView *dimView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
        dimView.backgroundColor = [UIColor blackColor];
        dimView.alpha = 0.5f;
        dimView.tag = 1111;
        dimView.userInteractionEnabled = NO;
        [self.view addSubview:dimView];

        [self performSegueWithIdentifier:@"fbshareSigue" sender:self];
}

  /* This code should be put in the other method where you are removing the popup.. Because it will remove the dim view. here is the wrong place for this code*/  

 /* for (UIView *view in [self.view subviews]) {
        if (view.tag == 1111) {
            [view removeFromSuperview];
        }
    }*/

Dim doesn’t work…

====================

I have View OFAResultViewController that calling Popover (OFAFBShareViewController):

...
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

    if ([[segue identifier] isEqualToString:@"fbshareSigue"]) {
        OFAFBShareViewController *svc = (OFAFBShareViewController *) [segue destinationViewController];
        UIStoryboardPopoverSegue *popoverSegue = (UIStoryboardPopoverSegue *)segue;
        svc.postBlock = self.postInitBlock;
        [svc setClosePopWindow:[popoverSegue popoverController]];
    }
}

- (IBAction)publishButtonAction:(id)sender {
    UIView *dimView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
    dimView.backgroundColor = [UIColor blackColor];
    dimView.alpha = 0.5f;
    dimView.tag = 1111;
    dimView.userInteractionEnabled = NO;
    [self.view addSubview:dimView];
    [self performSegueWithIdentifier:@"fbshareSigue" sender:self];    
}
...

In OFAFBShareViewController I’m trying to close the dim view:

...
- (IBAction)cancelButtonAction:(id)sender {
    [closePopWindow dismissPopoverAnimated:YES];
    for (UIView *view in [self.view subviews]) {
            if (view.tag == 1111) {
                [view removeFromSuperview];
            }
}
...

But it doesn’t work again…

  • 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-13T14:59:11+00:00Added an answer on June 13, 2026 at 2:59 pm

    You can use the following code, when you display the popup.

    In OFAFBShareViewController

    - (void) loadView
    {
           [super loadView]; 
           UIView *dimView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
            dimView.backgroundColor = [UIColor blackColor];
            dimView.alpha = 0.5f;
            dimView.tag = 1111;
            dimView.userInteractionEnabled = NO;
            [self.view addSubview:dimView];
    }
    

    After popup removed, delete this view from super view using the tag.

    After iOS 5.0 there is a public API method also introduced:

    ======================================================

    To remove the view you can use this code:

     for (UIView *view in [self.view subviews]) {
                    if ([view.tag == 1111]) {
                        [view removeFromSuperview];
                    }
                }
    

    Leave your Remove Dim View code as it is. Only Change super.view to self.view again.

    It’ll work for you then.

    Hope it works for you…

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

Sidebar

Related Questions

Let's say I have a basic form, there's a button and when I click
I've constructed a basic form in which there are certain elements, one of which
Is there a basic function call in MFC that simply plays the input error
In many programming languages there is the basic equals operator which will see if
Are there any online resources which show the basic steps to access the Microsoft
There is very important shortcut for "Basic Code Completion" in IntelliJ IDE which assumed
Is there any library which provide a text panel with basic formatting features. Such
I have quite a basic WPF form with a DockPanel, there's a Menu bar,
I have a basic upload form: <form method=post action= enctype=multipart/form-data > <input type=file name=logo>
I've a basic login form to which I want to add some validations. 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.