I created a share extension for my application in Swift. Now I have to call an API and send the title and image to the server. I am able to call the API from the didSelectPost
method of ShareViewController
but it is taking some time to complete the upload. My question is how can I show a progress bar or an activity indicator over there so that I can show to user that something is happening? Like in this image.
Also, can you please tell me the significance of the method completeRequestReturningItems([], completionHandler:)
? I read the documentation of this method but I can not use it in my application.