Q:

iOS Background threading Class

Is there a way to dispatch every method of certain class on specific thread? 
I want to run every method of a certain class asynchronously on background thread without adding 
DispatchQueue.global(qos: .background).async {
// code
}

to every method.  Which method of NSObject should I override? 

A:

That sounds unnecessary (and probably a bad idea).  If it were possible (which it probably isn't) it would mean every single method would require a completion block in order to return anything, even private functions. 
The better way to do this is to have most of your methods private, and have a few public methods as vectors into the class that call async. 
If you want to avoid all the syntax, you could do something like this:
let BA = { (block: @escaping () -> ()) in
        DispatchQueue.global(qos: .background).async(execute: block)
    }

BA {
    // do whatever
}

And if you want to do it for the entire function you could do:
func doSomething() { BA {

}}

