rootstrap / ios-base

Boilerplate for new iOS projects using Swift 5. Provides a handful of functionalities.
https://rootstrap.com/
MIT License
258 stars 63 forks source link

Replace root animation looks weird #138

Closed glm4 closed 4 years ago

glm4 commented 4 years ago

Update replace root transition type to a more native transition.

pMalvasio commented 4 years ago

It would be nice to have a solution here. We did a patch just setting animated: false for the change root as a temporary solution.

glm4 commented 4 years ago

I think we had this before in the base, but the fix for this will be adding a custom segue or at least a basic transition like:

    let window = UIApplication.shared.keyWindow
    let transition = CATransition()
    transition.duration = duration
    transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
    transition.type = transitionType // i.e Push, fade, etc
    transition.subtype = transitionSubtype // i.e fromBottom
    window?.layer.add(transition, forKey: kCATransition)