marty-suzuki / SAParallaxViewControllerSwift

SAParallaxViewControllerSwift realizes parallax scrolling with blur effect. In addition, it realizes seamless opening transition.
MIT License
260 stars 24 forks source link

Support orientation change #17

Open ogezue opened 8 years ago

ogezue commented 8 years ago

Your ibrary works well as long as you don't change the orientation of the device. Even in your demo after I enabled orientation change.

I tried to solve it with

    override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
        super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)

       OverviewViewModel.sharedInstance.reload()

    }

func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {

        let collectionViewWidth = self.view.bounds.size.width
        return CGSize(width: collectionViewWidth, height: 150)
    }

but it remains the old size and the old label still is visible. Any ideas?

ogezue commented 8 years ago

Any idea how I could solve this?