I am wanting to convert a string into a class type.
func getViewController(sbName: String, vcName: String, vcType: String) -> UIViewController{
let classType = ????? //What to put here?
let sb = UIStoryboard(name: sbName, bundle: nil)
var vc = sb.instantiateViewControllerWithIdentifier(vcName) as classType
return vc
}
If anyone could lead me in the right direction, I'd greatly appreciate it! I have a feeling there is a way to do it but have not been able to find a way how.