1

I want to be able to present a viewController with crossDissolve but dismiss it with the traditional top to bottom dismissal. Is there a way to change the modalTransitionStyle once the viewController has opened?

Here is how I am currently presenting

I want to be able to present a viewController with crossDissolve but dismiss it with the traditional top to bottom dismissal. Is there a way to change the modalTransitionStyle once the viewController has opened?

Here is how I am currently presenting

 let layout = UICollectionViewFlowLayout()
        let userSearchController = UserSearchController(collectionViewLayout: layout)
        userSearchController.modalTransitionStyle = .crossDissolve
        currentController?.present(userSearchController, animated: true, completion: nil)
user6520705
  • 705
  • 3
  • 11
  • 38

1 Answers1

0

Using @Jason's comment I did the following

        userSearchController.modalTransitionStyle = .crossDissolve
    currentController?.present(userSearchController, animated: true, completion: {
        userSearchController.modalTransitionStyle = .coverVertical
    })

and it works perfectly

user6520705
  • 705
  • 3
  • 11
  • 38