Showing activity indicator (loading image) while processing in background
There are a few things I would recommend to do. 


Usually, instead of disabling the interaction events there is an extra layer on top of all views that contains the activity indicator. So, instead of adding the activity indicator directly into the viewController's view, add it in another view first with clear background color and with 0.4 alpha.
Right now the startLoading() function also sets up the activity indicator, what i would rather separate into a different function, like setupLoading()
If you want to reuse the solution on other viewControllers, create a class or a protocol at least ecapsulating the logic. Also, it is better to present it on the UIApplication's keyWindow property, than just simply adding it to viewContollers view's.
Prepare for the stopLoading() and startLoading() functions to be called from a background thread.


Finally, there are plenty of very good solutions already on the interwebs, that you could integrate into your project, like SwiftSpinner.

If you need further help, code examples, let me know and I will edit my answer.