material-motion-archive / coreanimation-swift

Archived February 16, 2017 :: Core animation plan types for Apple devices
Apache License 2.0
5 stars 2 forks source link

Handle failure to acquire token more gracefully #12

Open jverkoey opened 7 years ago

jverkoey commented 7 years ago
CATransaction.begin()
guard let token = tokenGenerator.generate() else { return }

If we fail to generate a token then we're left with an open CATransaction. We should attempt to acquire the token before initiating the transaction.