I just downloaded the latest files for iOS Animations by Tutorials and have run into the following issues:
On first run, it crashes on line 93 of ViewController.swift: let imageView = listView.viewWithTag(i) as! UIImageView (could not cast value of type ‘UIView’ (0x7fff895ce1e8) to ‘UIImageView’ (0x7fff895cde00))
After commenting out the cast (// as! UIImageView) the app launches and the transition to HerbDetailsViewController.swift work, but dismissing it crashes on line 39 of PopAnimator.swift: let toView = transitionContext.view(forKey: .to)! (Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value)
Why is ‘transitionContext.view(forKey: .to)’ returning nil?