<分区>
我有一个类如下
Class ViewControlelr: UIViewController {
func instantiateDocumentSubPartNavigationVC(documentPart: DocumentPart, documentPartsArray: [DocumentPart]) {
//definition
}
}
在另一个名为 ViewController2 的类中,我想调用上面的方法。 我希望看到下面的内容,这样我就可以将参数传递给 ViewController2 中的方法
ViewController.instantiateDocumentSubPartNavigationVC(documentPart: DocumentPart, documentPartsArray: [DocumentPart])
但我实际看到的是
ViewController.instantiateDocumentSubPartNavigationVC(ViewController)
如何在不同的类中成功使用类方法?