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

  • Home
  • SEARCH
  • 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 7529053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:33:16+00:00 2026-05-30T04:33:16+00:00

How does Apple do the iPhone calendar day view transition between dates? When you

  • 0

How does Apple do the iPhone calendar day view transition between dates? When you swipe your finger on the day view it looks a bit like a carousel and when the day view is half way across the screen the date at the top changes.

I have recreated the day view myself but need to figure out how to do the transition between days.

  • 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-30T04:33:17+00:00Added an answer on May 30, 2026 at 4:33 am

    If I had to guess? Using 3 panes in a UIScrollView like this method.

    - (void)viewDidLoad 
    {
      [super viewDidLoad];
    
      documentTitles = [[NSMutableArray alloc] init];
    
      // create our array of documents
      for (int i = 0; i < 10; i++) {
        [documentTitles addObject:[NSString stringWithFormat:@"Document %i",i+1]];
      }
    
      // create placeholders for each of our documents
      pageOneDoc = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
      pageTwoDoc = [[UILabel alloc] initWithFrame:CGRectMake(320, 0, 320, 44)];
      pageThreeDoc = [[UILabel alloc] initWithFrame:CGRectMake(640, 0, 320, 44)];
    
      pageOneDoc.textAlignment = UITextAlignmentCenter;
      pageTwoDoc.textAlignment = UITextAlignmentCenter;
      pageThreeDoc.textAlignment = UITextAlignmentCenter;
    
      // load all three pages into our scroll view
      [self loadPageWithId:9 onPage:0];
      [self loadPageWithId:0 onPage:1];
      [self loadPageWithId:1 onPage:2];
    
      [scrollView addSubview:pageOneDoc];
      [scrollView addSubview:pageTwoDoc];
      [scrollView addSubview:pageThreeDoc];
    
      // adjust content size for three pages of data and reposition to center page
      scrollView.contentSize = CGSizeMake(960, 416);
      [scrollView scrollRectToVisible:CGRectMake(320,0,320,416) animated:NO];
    }
    
    - (void)loadPageWithId:(int)index onPage:(int)page 
    {
      // load data for page
      switch (page) {
        case 0:
          pageOneDoc.text = [documentTitles objectAtIndex:index];
          break;
        case 1:
          pageTwoDoc.text = [documentTitles objectAtIndex:index];
          break;
        case 2:
          pageThreeDoc.text = [documentTitles objectAtIndex:index];
          break;
      }
    }
    
    - (void)scrollViewDidEndDecelerating:(UIScrollView *)sender 
    {
      // All data for the documents are stored in an array (documentTitles).
      // We keep track of the index that we are scrolling to so that we
      // know what data to load for each page.
      if(scrollView.contentOffset.x > scrollView.frame.size.width) 
      {
        // We are moving forward. Load the current doc data on the first page.
        [self loadPageWithId:currIndex onPage:0];
    
        // Add one to the currentIndex or reset to 0 if we have reached the end.
        currIndex = (currIndex $gt;= [documentTitles count]-1) ? 0 : currIndex + 1;
        [self loadPageWithId:currIndex onPage:1];
    
        // Load content on the last page. This is either from the next item in the array
        // or the first if we have reached the end.
        nextIndex = (currIndex $gt;= [documentTitles count]-1) ? 0 : currIndex + 1;
    
        [self loadPageWithId:nextIndex onPage:2];
      }
      if(scrollView.contentOffset.x $lt; scrollView.frame.size.width) {
        // We are moving backward. Load the current doc data on the last page.
        [self loadPageWithId:currIndex onPage:2];
    
        // Subtract one from the currentIndex or go to the end if we have reached the beginning.
        currIndex = (currIndex == 0) ? [documentTitles count]-1 : currIndex - 1;
        [self loadPageWithId:currIndex onPage:1];
    
        // Load content on the first page. This is either from the prev item in the array
        // or the last if we have reached the beginning.
        prevIndex = (currIndex == 0) ? [documentTitles count]-1 : currIndex - 1;
    
        [self loadPageWithId:prevIndex onPage:0];
      }     
    
      // Reset offset back to middle page
      [scrollView scrollRectToVisible:CGRectMake(320,0,320,416) animated:NO];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's well known that Apple does not provide automatic garbage collection on the iPhone
Apple announced a higher res display for the iPhone 4, yesterday. What does this
Is it possible to programmatically power off an iPhone or does Apple disallow this?
Does Apple reject iPhone/iPad Apps because of using Third Prty APIs..
Does Apple or anyone have a glossary of terms used in iphone and android
I would like to know how updates work for the Apple store. Does Apple
As far as I know, Apple does not allow bluetooth file sharing in iPhone/iPad.
does iPhone simulator calendar store availability correctly for an event? I've got a test
Does iPhone sdk supports route between two places on Map? I have searched many
Does Apple's Xcode development environment provide any tools for memory leak detection? I am

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.