let preStr = Bundle.main.infoDictionary?["CFBundleExecutable"] as? String
log("prestr: \(String(describing: preStr))")
if var _preStr = preStr {
//如果项目名中有 — 需要做一下 替换 ,否则不需要
_preStr = _preStr.replacingOccurrences(of: "-", with: "_")
let vcClass = NSClassFromString(_preStr + vcTitleArr[indexPath.row]) as! UIViewController.Type
let vc = vcClass.init()
self.navigationController?.pushViewController(vc, animated: true)
}
网友评论