Matrosov Alexander Matrosov Alexander - 1 year ago 52
Swift Question

How to call swift function

I have a function:

func chatAttachmentService(chatAttachmentService: QMChatAttachmentService, didChangeLoadingProgress progress: CGFloat, forChatAttachment attachment: QBChatAttachment)

I want to call it in my file:

self.chatAttachmentService(chatAttachmentService, progress, attachment)

I know it's crazy question, but Xcode does not show for me a hint when typing name of function and I don't know how to call it in right way...

Answer Source

For example you can do it this way:

Here is example function:

func testFunction(chatAttachmentService: String, didChangeLoadingProgress progress: String, forChatAttachment attachment: String) {

    //Your code

And you can call it this way:

testFunction("", didChangeLoadingProgress: "", forChatAttachment: "")