此函数创建一个动态表。如何通过小部件工厂创建小部件? 当然,这是原始代码的一部分。
let sb = UIStoryboard(name: "Main", bundle: Bundle.main)
if let viewcontroller = sb.instantiateViewController(withIdentifier: "storyboardIdentifier") as? YourViewController {
self.navigationController?.pushViewController(viewcontroller, animated: true)
}