21 lines
425 B
Swift
21 lines
425 B
Swift
//
|
|
// CATransaction.swift
|
|
// VDS
|
|
//
|
|
// Created by Matt Bruce on 8/2/22.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
|
|
extension CATransaction {
|
|
|
|
/// Performs changes without activating animation actions.
|
|
public static func withDisabledAnimations(_ actionBlock: Blocks.ActionBlock) {
|
|
CATransaction.begin()
|
|
CATransaction.setDisableActions(true)
|
|
actionBlock()
|
|
CATransaction.commit()
|
|
}
|
|
}
|