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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:24:17+00:00 2026-06-03T00:24:17+00:00

Hey so I have a problem where I am inserting an actionsheet into a

  • 0

Hey so I have a problem where I am inserting an actionsheet into a view that is inside of a scrollview in a different view controller. The actionsheet works just fine, the problem is that if i go down at all in the scrollview the actionsheet gets clipped off. I’ve tried several solutions with no luck. I think the problem is that the actionsheet is being inserted into the view that is placed inside the scrollview. Anyone have any idea how to launch the action sheet from the view controller that the scrollview is in instead? Here is how I am trying to do it right now:

When a button is touched it calls this method:

- (IBAction)callDP:(id)sender {

    UIButton *selectedButton = (UIButton *)sender;

    actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:nil cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];

    [actionSheet setActionSheetStyle:UIActionSheetStyleBlackTranslucent];

    CGRect pickerFrame = CGRectMake(0, 40, 0, 0);

    datePickerView = [[UIDatePicker alloc] initWithFrame:pickerFrame];
    datePickerView.tag = 10;

    [datePickerView addTarget:self action:@selector(changeDate:)   forControlEvents:UIControlEventValueChanged];

    [actionSheet addSubview:datePickerView];
    [actionSheet setTitle:@"Start Date"];        
    UISegmentedControl *closeButton = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@"Done"]];
    closeButton.momentary = YES; 
    closeButton.frame = CGRectMake(260, 7.0f, 50.0f, 30.0f);
    closeButton.segmentedControlStyle = UISegmentedControlStyleBar;
    closeButton.tintColor = [UIColor blackColor];
    [closeButton addTarget:self action:@selector(dismissActionSheet) forControlEvents:UIControlEventValueChanged];
    [actionSheet addSubview:closeButton];


    datePickerView.datePickerMode = UIDatePickerModeDate;


   //THIS IS THE PART THAT I THINK I AM HAVING THE PROBLEM WITH 

   // [actionSheet showFromToolbar:self.toolbarItems];
    //[actionSheet showFromTabBar:self.parentViewController.tabBarController.tabBar];
    [actionSheet showInView:self.parentViewController.view];


}

Here is where I insert the view into the scrollview. I have it set up so that I am using a view from a different uiviewcontroller class to control everything. The reason I do that is so that i can have the scrollable part, but be able to visually create everything that I need without having to do it programmatically….I apologize if that is kind of confusing. I can clarify if needs be…but here it is. The viewcontroller class that contains the view I want to put into the scroll view is called registration page. Its inside of registrationPage that it calls the actionSheet. Let me know what you think…

registrationPage = [[RegistrationPageToInsertViewController alloc]init];

    viewToInsert = registrationPage.view;

    [scrollView addSubview:viewToInsert];
    [scrollView setContentSize:viewToInsert.frame.size];
//    [scrollView sendSubviewToBack:imgView];

    //scrollView.contentSize=CGSizeMake(320,416);
    [self.view bringSubviewToFront:scrollView];

Here are a couple of screenshots to help you see what I’m talking about:
This is what happens when you click on the button while its at the bottom of the screen

This is what happens when i scroll down a little bit on the screen and then push the birthdate button

  • 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-03T00:24:18+00:00Added an answer on June 3, 2026 at 12:24 am

    instead of this line

    [actionSheet showInView:self.parentViewController.view]; 
    

    try like this.

    [actionSheet showInView:self.view];
    

    Just do as i say.You have a nib or viewController. Whatever. Just add a scrollView as subView to what you have.Then you just add all your textfields, labels and all will be subview of scrollView.this is the correct way to do that.if you present action sheet,you have to show that in self.View only.

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

Sidebar

Related Questions

Hey guys, I have a weird problem. I have an update system that refreshes
hey there i am having problem i have List<List<memoryCard>> that i want to show
Hey guys, I have a problem with a code that I've been writing. I
Hey! Have a problem that is driving me crazy! My Main Window will not
hey all i have a problem in webservice that i am consuming. it takes
Hey guys i have a problem. I have a listview that is dynamically filled.
hey guys I have a problem adding text inside an added html-tag I have
Hey I have a problem comparing the value of a CGPoint (struct with two
Hey I have a problem with the validation and upload of apps to the
Hey all, i have a problem with trying to get 2 forms to close

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.