bug on UserCardDismissAnimationController
adelbios opened this issue · comments
when I use navagationController present UserCardViewController ok that's right ?
so when go back ( dismiss) to ViewController I got black screen after animation completed
I fixit.... the solution .....
1- go to UserCardDismissAnimationController
replace this line
let toVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to)! as? GarlandViewController
INTO
let toVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to)!
2- add property to UserCardDismissAnimationController
var rootViewController : GarlandViewController?
3- replace
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { self.selectedCardIndex = indexPath let cardController = UserCardViewController.init(nibName: "UserCardViewController", bundle: nil) present(cardController, animated: true, completion: nil) }
** INTO**
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { self.selectedCardIndex = indexPath let cardController = UserCardViewController.init(nibName: "UserCardViewController", bundle: nil) cardController.userCardDismissAnimationController.rootViewController = self present(cardController, animated: true, completion: nil) }