TransitionTreasury
TransitionTreasury copied to clipboard
Generic parameter 'T' could not be inferred
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
Yes I'm getting this error also. Some people did have also. Please give us instructions to resolve. thanks.
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.
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 ;)
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 https://github.com/DianQK/TransitionTreasury/issues/25#issuecomment-250966182, or mute the thread https://github.com/notifications/unsubscribe-auth/AVhoZTjv5Z3B2aKlF-tYjDcjwWjWXIkuks5qv5JCgaJpZM4JpmTm.
@CedricJEA : What did you change? It still won't work for me, I still have the "Generic" error.
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.