我有一个函数:
func chatAttachmentService(chatAttachmentService: QMChatAttachmentService, didChangeLoadingProgress progress: CGFloat, forChatAttachment attachment: QBChatAttachment)
我想在我的文件中调用它:
self.chatAttachmentService(chatAttachmentService, progress, attachment)
我知道这是个疯狂的问题,但 Xcode 在输入函数名称时没有向我显示提示,而且我不知道如何以正确的方式调用它...
最佳答案
例如你可以这样做:
这是示例函数:
func testFunction(chatAttachmentService: String, didChangeLoadingProgress progress: String, forChatAttachment attachment: String) {
//Your code
}
你可以这样调用它:
testFunction("", didChangeLoadingProgress: "", forChatAttachment: "")
关于swift - 如何调用swift函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37134846/