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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:08:21+00:00 2026-06-14T14:08:21+00:00

I am trying to implement a calendar using UICollectionView which has a similar scrolling

  • 0

I am trying to implement a calendar using UICollectionView which has a similar scrolling behaviour to the built in calendar app when changing months. At the moment the view is flickering as the resize occurs between months.

I am using a UICollectionViewScrollLayout with a UICollectionView with 10000 indexes in 1 section. The cells are filled by calculating the day for an index. The problem I am having is when trying to resize the view to fit the correct number of weeks for the month, the collectionview doesn’t appear to draw in the cells quickly enough as the scrolling and view size change happens. Having slowed the animation down, as the view size changes, it appears that cells are being removed too early from the view. This happens both with a reducing and enlarging the view. Ie, as they are about to scroll off the view they are removed before scrolling out of the view.

The layout is all done using autolayout and there is a fixed view above and then a resizable view below. As the size of the collection view changes the view below changes to fill the space. The only way I seem to have managed to achieve this behavior it is by changing the intrinsic size as per the code below. I have tried changing the frame/bounds but it doesn’t seem to work with autolayout. Am I going about the resizing of the view in the right way?

Should I be moving the behaviour to the viewcontroller and change the constraints pinning the height instead.

// Scroll the view to the date given.
-(void) moveViewToDate:(NSDate*) date
{
    NSIndexPath *indexPath=[self indexPathForFirstDayInMonth:date];
    [self scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionTop animated:YES];

    [UIView animateWithDuration:0.25f animations:^{
        self.isize=[self weeksInViewForDate:date];
       [self invalidateIntrinsicContentSize];
       [self.superview layoutIfNeeded];
    }];
}

-(CGSize)intrinsicContentSize
{
    return CGSizeMake(322,self.isize*46);   
}
  • 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-14T14:08:22+00:00Added an answer on June 14, 2026 at 2:08 pm

    I finally worked out what was going on. Since I was committing an animation which was changing the size of the view and doing a scroll, the two seperate animations where conflicting with each other.

    I eventually rewrote the collection using UIScrollView but had the same problem. I got round it by placing the UIScrollView in a UIView. The UIView was resized using a constraint on the height which was animated.

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

Sidebar

Related Questions

Trying to implement a UITableView of names similar to the built-in Contacts iPhone app
I am trying to implement a view similar to that of Apple's calendar application's
I'm trying to implement a event calendar using jquery-ui's datepicker. I've successfully installed the
I am currently trying to implement a date range search function using Obout Calendar
I'm building a calendar in ASP.NET using Jquery, And I'm trying to implement Print.
I'm trying implement A* Start path finding in my games(which are written with JavaScript,
Trying to implement google C2DM service. registrationIntent.putExtra(app, PendingIntent.getBroadcast(context,0,new Intent(), 0)); registrationIntent.putExtra(sender,example@gmail.com); context.startService(registrationIntent); Almost every
Trying to implement a search similar to here .This searches properties based on city,locality,property
I am trying to implement the Jquery datepicker using a google hosted theme. But
This one has me pulling my hair out. I'm trying to implement a very

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.