Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

Generic parameter 'T' could not be inferred #25

Open
lfarah opened this issue Aug 22, 2016 · 6 comments
Open

Generic parameter 'T' could not be inferred #25

lfarah opened this issue Aug 22, 2016 · 6 comments

Comments

@lfarah
Copy link

lfarah commented Aug 22, 2016

Using the code example in the readme:

        let storyboard = UIStoryboard(name: "Main", bundle: nil)
        let mainVC = storyboard.instantiateViewControllerWithIdentifier("searchVC") as? SearchViewController
        navigationController?.tr_pushViewController(mainVC, method: TRPushTransitionMethod.Fade, completion: {
            print("Push finish")
        })

Error in 3rd line:

Generic parameter 'T' could not be inferred

@alkanyunus
Copy link

Yes I'm getting this error also. Some people did have also. Please give us instructions to resolve.
thanks.

@CedricJEA
Copy link

Hello, I have the same error. Second controller is a class deviated from UIViewController with NavgationTransitionable protocol but i can't inferred it.
Please help.

@alkanyunus
Copy link

alkanyunus commented Oct 2, 2016

Yeah, I read carefully and I figured out yesterday.
You have to conform the delegate in your view controller, for instance you want to make a push a view controller, then you'll have to write "NavgationTransitionable" in your second view controller which is pushing up ;)

@CedricJEA
Copy link

It’s what I did :

import UIKit
import TransitionTreasury

class CircleViewController: UIViewController , NavgationTransitionable {

  var tr_pushTransition: TRNavgationTransitionDelegate?



override func viewDidLoad() {
    super.viewDidLoad()

    // Do any additional setup after loading the view.
}

}and in the main controller :

    let vc: CircleViewController = CircleViewController()

    navigationController?.tr_presentViewController(vc, method: .push, statusBarStyle: .default, completion: {     
    })

Is the version compatible with Swift 3 ? i had to make some change in TransitionAnimation to compile in swift 3 (not treasury).

Le 2 oct. 2016 à 13:15, Yunus Alkan [email protected] a écrit :

Yeah, I read carefully and I figured out yesterday.
You have to conform the delegate in your view controller, for instance you want to make a push a view controller, then you'll have you write "NavgationTransitionable" in your second view controller which is pushing up ;)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #25 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AVhoZTjv5Z3B2aKlF-tYjDcjwWjWXIkuks5qv5JCgaJpZM4JpmTm.

@AkdM
Copy link

AkdM commented Aug 25, 2017

@CedricJEA : What did you change? It still won't work for me, I still have the "Generic" error.

@QiProject
Copy link

hi i think the issue is not just only add NavgationTransitionable, i had to do
pod 'TransitionAnimation', '~> 5.0'
and
import TransitionAnimation in the FirstViewController
this works for me, hope it helps you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants