Contents

withTransaction(_:_:)

Executes a closure with the specified transaction and returns the result.

Declaration

func withTransaction<Result>(_ transaction: Transaction, _ body: () throws -> Result) rethrows -> Result

Parameters

  • body:

    A closure to execute.

Return Value

The result of executing the closure with the specified transaction.

See Also

Moving an animation to another view