Skip to content

Date cells and month/year get messed up when changing orientation from portrait to landscape and vice versa #1022

@mxp7064

Description

@mxp7064

Date cells and month/year get messed up when changing orientation from portrait to landscape and vice versa. The cells misalign and month/year goes to random like year 2035 or 2006. After that when I change orientation again everything goes back to normal, very strange bug!
Integration method: cocoapods
Steps to reproduce:
Change orinetation from landscape to portrait and vice versa
ipad mini 2 and iphone 6 both ios 12.1
Xcode version. 10.1
FSCalendar version: multiple versions have this issue, I tried 2.6, 2.7.9 and 2.8.0

Screenshots:
I start with for example 11/11/2018 date selected (current day by default) and I change orientation and get this:
45879644_726276941052574_8620385416207400960_n

I managed to make a temporary workaround which seems to work only for version 2.7.9:
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { super.viewWillTransition(to: size, with: coordinator) coordinator.animate(alongsideTransition: {_ in self.calendar.reloadData() }, completion: nil) }

It looks almost the same as this unsolved issue:
#434

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions