Skip to content

Commit b20dfb0

Browse files
committed
refactoring
1 parent ca59709 commit b20dfb0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Sources/swiftui-loop-videoplayer/protocol/view/VectorLayerProtocol.swift renamed to Sources/swiftui-loop-videoplayer/protocol/vector/VectorLayerProtocol.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,22 @@ public protocol LayerMakerProtocol {
4949

5050
extension LayerMakerProtocol{
5151

52-
@MainActor
52+
5353
/// Adds a vector layer to the composite layer using a specified builder.
5454
///
5555
/// - Parameters:
5656
/// - builder: An instance conforming to `ShapeLayerBuilderProtocol` that constructs the vector layer.
5757
/// - clear: A Boolean value that indicates whether to clear existing vector layers before adding the new one.
58+
@MainActor
5859
func addVectorLayer(builder : any ShapeLayerBuilderProtocol, clear: Bool){
5960
if clear{ removeAllVectors() }
6061
let layer = builder.build(with: (frame, bounds))
6162
compositeLayer.addSublayer(layer)
6263
}
6364

64-
@MainActor
65+
6566
/// Removes all vector layers from the composite layer.
67+
@MainActor
6668
func removeAllVectors(){
6769
compositeLayer.sublayers?.forEach { $0.removeFromSuperlayer() }
6870
}

0 commit comments

Comments
 (0)