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

The Archive Base Latest Questions

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

I am creating a app that display subview like ActionSheetView and in that i

  • 0

I am creating a app that display subview like ActionSheetView and in that i have added UIGridView and UIPageControll thru outlet , but now when i click the cell it does not respond ,my subview is a ViewController with the nib file.

and if i create a button and add in my popupview programmatically then it wil displaying, and also get the click event, but anything in outlet does not respond.

i have tried to set userinteraction enable in my subview but it does not done any good.

here is my code for first view that display subview by clicking barbutton:

- (void)popUpView:(id)sender {
    //self.view.backgroundColor = [UIColor darkGrayColor];

   bGView = [[UIView alloc] init];   /this is the background view and all view is added in it
    bGView.frame = CGRectMake(0,0,320,490);
    bGView.backgroundColor = [UIColor clearColor];
    bGView.alpha = 0.8 ;

    CGRect  viewFrame = CGRectMake(10, 90, 300, 300);
    aPopUpViewController = [[PopUpViewController alloc] initWithNibName:@"PopUpViewController" bundle:nil];        //this is my view controller and when this shows on screen it display my greed view

    aPopUpViewController.view.frame = viewFrame; 
    aPopUpViewController.view.userInteractionEnabled = YES;

    [bGView addSubview:aPopUpViewController.view];

    button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button addTarget:self 
               action:@selector(aMethod:)
     forControlEvents:UIControlEventTouchDown];
    button.backgroundColor = [UIColor clearColor];
    [button setBackgroundImage:[UIImage imageNamed:@"close_button.png"] forState:UIControlStateNormal];
    button.frame = CGRectMake(-1, 80, 30, 30);
    [bGView addSubview:button];

    //for view animation

    /*
    // from bottom to center animation

    [bGView setFrame:CGRectMake( 0.0f, 480.0f, 320.0f, 480.0f)]; //notice this is OFF screen!
    [UIView beginAnimations:@"animateTableView" context:nil];
    [UIView setAnimationDuration:0.4];
    [bGView setFrame:CGRectMake( 0.0f, 0.0f, 320.0f, 480.0f)]; //notice this is ON screen!
    [UIView commitAnimations];*/

    //for page like effect

    /*[UIView transitionWithView:self.view duration:0.5
                       options:UIViewAnimationOptionTransitionCurlUp //change to whatever animation you like
                    animations:^ { [self.view addSubview:bGView]; }
                    completion:nil];*/

    /*CATransition *transition = [CATransition animation];
     transition.duration = 1.0;
     transition.type = kCATransitionReveal; //choose your animation
     [bGView.layer addAnimation:transition forKey:nil];
     [self.view addSubview:bGView];*/

    aPopUpViewController.view.userInteractionEnabled = YES;
    bGView.userInteractionEnabled = YES;
    self.view.userInteractionEnabled = YES;

    bGView.transform = CGAffineTransformMakeScale(0.01, 0.01);
    [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
        bGView.transform = CGAffineTransformIdentity;
    } completion:^(BOOL finished){
        // do something once the animation finishes, put it here
    }];

     [self.view addSubview:bGView];


    addLabel.enabled = NO;
    clipArt.enabled = NO;
    emailItem.enabled = NO;
    closeButton.enabled = NO;
    self.navigationController.topViewController.title = @"Choose ClipArt";

    ExampleAppDataObject* theDataObject = [self theAppDataObject];

   theDataObject.navBarHide = @"no";

}

- (void)aMethod:(id)sender
{
    //[aPopUpViewController.view removeFromSuperview];
    //[button removeFromSuperview];

    /*[UIView transitionWithView:self.view duration:0.5
                       options:UIViewAnimationOptionTransitionCrossDissolve//change to whatever animation you like
                    animations:^ { [bGView removeFromSuperview]; }
                    completion:nil];*/

    [bGView removeFromSuperview];

    addLabel.enabled = YES;
    clipArt.enabled = YES;
    emailItem.enabled = YES;
    closeButton.enabled = YES;

    self.navigationController.topViewController.title = @"Greeting's";

    ExampleAppDataObject* theDataObject = [self theAppDataObject];

    theDataObject.navBarHide = @"yes";
}

and this is how my screen look like
enter image description here

UPDATE

now i figured out my problem,problem is that i have given my whole view a tap listner,now i am adding grid view as subview so when ever i tap on cell rather then do select cell it will generate view tap gesture and thats why cell never selected,that’s what i think..

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

    add this line after you add every subviews in your main view..

    [self.view bringSubviewToFront:yourGridView];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a Monotouch iPhone app that will display streaming videos. I have
I am creating a web app that uses the Google Maps API to display
I'm creating and app that will rely on a database, and I have all
I'm pondering creating a WPF or Silverlight app that acts just like a terminal
I'm creating an app that will have a fair amount of users. Everytime someone
I am creating a quiz app that will display something depending on their results
I'm guessing not, but I'm creating an app that gets the users coordinates using
I am creating app that download 4-5 images from server and display as gallery.
I'm creating an app that needs to display the phone contacts with its photo,
I am creating an HTML5 app that will display a bunch of shapes 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.