swift中的坑
1.NSClassFromString
//获取工程名称
let group = Bundle.main.infoDictionary
let fileName = group?[kCFBundleExecutableKey as String] as! String
//LyRacDemo是工程名称,PersonClass是类的名称 -> NSClassFromString("工程名.类名") as? NSObject.Type
let modelClass = NSClassFromString("LyRacDemo.PersonClass") as? NSObject.Type
if modelClass != nil { let cl = modelClass?.init() }