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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:24:52+00:00 2026-05-16T05:24:52+00:00

Is the UIPicker that pops up from the bottom of the screen when an

  • 0

Is the UIPicker that pops up from the bottom of the screen when an action is called just a basic UIPickerView that is coordinated in a certain way? (Like a UIActionSheet?) How would I implement that?

  • 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-05-16T05:24:52+00:00Added an answer on May 16, 2026 at 5:24 am

    Here’s animation code, that I use:

    - (void)animateDatePicker:(BOOL)show {
        CGRect screenRect = self.frame;
        CGSize pickerSize = [self.datePickerView sizeThatFits:CGSizeZero];
        CGRect startRect = CGRectMake(0.0,
                                      screenRect.origin.y + screenRect.size.height,
                                      pickerSize.width, pickerSize.height);
    
        CGRect pickerRect = CGRectMake(0.0,
                                       screenRect.origin.y + screenRect.size.height - pickerSize.height,
                                       pickerSize.width,
                                       pickerSize.height);
    
        self.datePickerView.frame = pickerRect;
        self.backgroundColor = UIColorMakeRGBA( 64, 64, 64, 0.7f - (int)show * 0.7f );
    
        if ( show ) {
            self.datePickerView.frame = startRect;
            [self.parentViewController addSubviewToWindow:self];
        }
    
        [UIView beginAnimations:nil context:nil];
        [UIView setAnimationDuration:0.3f];
        [UIView setAnimationDelegate:self];
    
        self.backgroundColor = UIColorMakeRGBA( 64, 64, 64, 0.0f + (int)show * 0.7f );
    
        if ( show ) {
            self.datePickerView.frame = pickerRect;
        } else {
            [UIView setAnimationDidStopSelector:@selector(slideDownDidStop)];
            self.datePickerView.frame = startRect;
        }
    
        [UIView commitAnimations];  
    }
    

    datePickerView is a view, that contains DatePicker:

    self.datePickerView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 174.0, 320.0, 286.0)];
    self.datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0.0, 70.0, 320.0, 216.0)];
    [self.datePicker setDatePickerMode:UIDatePickerModeDate];
    [self.datePicker addTarget:self action:@selector(pickerValueChanged:) forControlEvents:UIControlEventValueChanged];
    [self.datePickerView addSubview:self.datePicker];
    

    parentViewController should implement addSubviewToWindow method:

    - (void)addSubviewToWindow:(UIView *)addView {
        [self.view addSubview:addView];
    }
    

    UIColorMakeRGBA:

    #define UIColorMakeRGBA(nRed, nGreen, nBlue, nAlpha) [UIColor colorWithRed:(nRed)/255.0f green:(nGreen)/255.0f blue:(nBlue)/255.0f alpha:nAlpha]
    

    slideDownDidStop is a method, that will be called after datePicker slide down successfully.

    So, just to summarize – you have MyViewController, that have

    MyDatePickerView *myDatePicker;
    

    field.

    MyDatePickerView is a custom class, that have UIDatePicker *datePicker field, MyViewController *parentViewController and animateDatePicker method.

    When you perform some action on MyViewController (for example, UIControlEventTouchUpInside for some button), you should invoke

    [myDatePicker animateDatePicker:YES];
    

    Please let me know if you have questions.

    UPDATE:
    Here’s a small example.

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

Sidebar

Related Questions

I have a dependent UIPicker that loads the values into its two components from
I just updated my project to ios6 and discovered that my UIPicker is no
I have a UIViewController that has a UIPickerView and UITableView. The UIPicker has 3
So I have a uipicker view, that I have managed to load some data
I'd like to create a fairly complex row in my UIPicker. All of the
I have a UIPicker with a UILabel above it that updates displaying the current
Hii, I add the uipicker on a view. and that view i am showing
How do I set UIPicker timezone? I have an app that has a dynamic
I would like to make a datepicker that shows weekdays, date and month. I
I am trying to pass my UItextfield value over to a UIPicker that 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.