Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force reload calendar #326

Closed
yurevich1 opened this issue Jun 11, 2016 · 2 comments
Closed

force reload calendar #326

yurevich1 opened this issue Jun 11, 2016 · 2 comments

Comments

@yurevich1
Copy link

yurevich1 commented Jun 11, 2016

how to force reload calendar for new frame? If I rotate iPad and pure change frame of calendar by
calendar.frame = newframe; with hidden calendar and unhide I can see incorrect size of elements. I can appear when calendar is not hidden.
Moreover, there is another bug: from time to time vertical spaces between vertical elements suddenly dissapear. I can't catch when but those bugs exist.

@WenchaoD
Copy link
Owner

Pls provide more details. Or make a demo which can 100% reproduce the issue and share a dropbox link.

@yurevich1
Copy link
Author

A few hours later I found that the calendar is being updated while calendar.showsPlaceholders = NO; if I pure change frame of calendar by calendar.frame = newframe.

If I set a calendar.showsPlaceholders = YES; it doesn't redraw if I rotate the device. Please, notice somewhere. Because of inside your method
- (void)layoutSubviews
Calendar has got this line:
BOOL needsAdjustingBoundingRect = self.scope == FSCalendarScopeMonth && !_showsPlaceholders && !self.hasValidateVisibleLayout;
So, the callback
[self boundingRectWillChange:NO]; is not fired if calendar.showsPlaceholders = YES.

@WenchaoD WenchaoD closed this as completed Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants