alberdev / CiaoTransitions

With Ciao you can make fancy custom push and modal transitions between view controllers
MIT License
91 stars 14 forks source link

Problem after dismiss view controller #2

Open hhernany opened 4 years ago

hhernany commented 4 years ago

After opening a viewController using the .vertical (or any other) type, the viewController is presented normally, without problems. However, the problem occurs after dismissing the presented viewController.

The collectionView of the first viewController "loses its position", and the entire app is positioned slightly higher.

In addition the statusBar becomes transparent, and the collectionView starts to appear behind it.

1) In this moment, everything is fine

Simulator Screen Shot - iPhone 6 - 2019-12-27 at 11 53 40

2) Now, the viewController controller is open

Simulator Screen Shot - iPhone 6 - 2019-12-27 at 11 53 57

3) Now after dimiss, the top of collectionView is a little higher.

Simulator Screen Shot - iPhone 6 - 2019-12-27 at 11 54 07

4) And, if a i scroll the collectionView, this happen.

Simulator Screen Shot - iPhone 6 - 2019-12-27 at 11 54 21

I am presenting the viewController like this

           let detailViewController = ScrollFadeViewController()

            configurator.dragDownEnabled = true
            configurator.dragLateralEnabled = false

            let transition = CiaoTransition(style: .vertical, configurator: configurator)

            detailViewController.ciaoTransition = transition 
            detailViewController.transitioningDelegate = transition 
            detailViewController.modalPresentationCapturesStatusBarAppearance = false
            detailViewController.modalPresentationStyle = .fullScreen
            detailViewController.hidesBottomBarWhenPushed = true

            navigationController?.delegate = transition
            present(detailViewController, animated: true, completion: nil)

And im my initial viewController, i configurate the collectionView like this:

        feedCollectionView.delaysContentTouches = false
        feedCollectionView.dataSource = self
        feedCollectionView.delegate = self
        feedCollectionView.clipsToBounds = false
        feedCollectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 20, right: 0)
        feedCollectionView.contentInsetAdjustmentBehavior = .never

Thanks in advance for any help.

hhernany commented 4 years ago

The same problem occurs if hide the status bar in presented viewController. If present a viewController, the hide status bar, and next dismiss, the same problem occurs.