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

The Archive Base Latest Questions

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

Scenario: UIScrollView has a UIButton. Tapping the UIButton leads to a UIPopoverController presenting itself

  • 0

Scenario:

UIScrollView has a UIButton. Tapping the UIButton leads to a UIPopoverController presenting itself from a specified rect. The UIPopoverController’s contentViewController is a UIViewController with a UIDatePicker.

Code that is fired when the button is tapped (button is of type custom with touch up inside tap registered):

- (void)showCalendar:(id)sender {
    dateViewController = [[UIViewController alloc] init];

    datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 0, 240, 200)];
    datePicker.datePickerMode = UIDatePickerModeDate;
    datePicker.hidden = NO;
    datePicker.date = [NSDate date];

    [datePicker addTarget:self
                   action:@selector(DateChanged:)
         forControlEvents:UIControlEventValueChanged];

    NSLocale *US = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
    NSCalendar *cal = [NSCalendar currentCalendar];
    [cal setLocale:US];
    [datePicker setCalendar:cal];
    [datePicker setMaximumDate:[NSDate date]];


    dateViewController.view = datePicker;

    dateViewController.contentSizeForViewInPopover = CGSizeMake(240, 200);
    self.popoverController = [[UIPopoverController alloc] 
                               initWithContentViewController:dateViewController];
    self.popoverController.delegate = self;

    NSLog(@"YESYESYES");

        [self.popoverController presentPopoverFromRect:CGRectMake(753, 513, 1, 1) inView:parentView permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];

    NSLog(@"NONONO");

}

There is a noticeable 1 second or more lag between the two NSLog statements when I connect the device to Xcode and run the app. What could be the reason for such a lag?

  • 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-10T18:59:32+00:00Added an answer on June 10, 2026 at 6:59 pm

    Solved the issued by replacing

    dateViewController.view = datePicker;
    

    with

    [dateViewController.view addSubview:datePicker];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following Scenario: I have a = UIViewController A that contains a UIScrollView I have
Scenario : I'll try to put an analogy with the loan broker example from
Scenario: I have a Question which has 2 radio buttons & two subforms: subformA
Scenario: I have imported the data from SQl Server to HDFS. The data stored
Scenario: many to many relationships. table has 2 columns: UserID and UserChoiche I am
Summary From a conceptual point of view, should one be working with UIViewController subclasses
Scenario Downloading an xlsx file to my local drive from a http location using
Scenario: Repository structure changed from /trunk/ to /projectName/trunk/ and the local copy is outdated
Scenario We are using Weblogic Server 10.3.4 to run our webapp which has security
Scenario- I have a method that returns an object retrieved from an NSMutableArray similar

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.