Navigationcontroller Hero transition animation no change

106 Views Asked by At

NavigationController embed in SearchViewController and DetailViewController when we click row DetailViewController I want it to pass with effect while passing, how can I do that?

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let vc = UIStoryboard.init(name: "Main", bundle: Bundle.main).instantiateViewController(withIdentifier: "DetailViewController") as! DetailViewController
        let back = UIBarButtonItem()
        vc.hero.isEnabled = true
        vc.hero.modalAnimationType = .zoomSlide(direction: .down)
        back.title = self.viewModel.moviesList?[indexPath.row].Title
        back.tintColor = .black
        navigationItem.backBarButtonItem = back
        vc.viewModel.movieId = self.viewModel.moviesList?[indexPath.row].imdbID
        self.navigationController?.pushViewController(vc, animated: true)
    }

this way nothing changes

0

There are 0 best solutions below