addOperations(_:waitUntilFinished:)
Adds the specified operations to the queue.
Declaration
func addOperations(_ ops: [Operation], waitUntilFinished wait: Bool)Parameters
Discussion
An operation object can be in at most one operation queue at a time and cannot be added if it is currently executing or finished. This method throws an NSInvalidArgumentException exception if any of those error conditions are true for any of the operations in the ops parameter.
Once added, the specified operation remains in the queue until its isFinished method returns true.