Skip to content

Commit e95145b

Browse files
committed
clean up
1 parent 016c9d0 commit e95145b

File tree

5 files changed

+3
-153
lines changed

5 files changed

+3
-153
lines changed

Sources/ExtensionKit/CoreGraphics/CGAffineTransform+Extensions.swift renamed to Sources/ExtensionKit/CoreGraphics/CGAffineTransform.swift

File renamed without changes.

Sources/ExtensionKit/SwiftUI/Animations/ShimmerView.swift

Lines changed: 0 additions & 87 deletions
This file was deleted.

Sources/ExtensionKit/SwiftUI/Preview.swift

Lines changed: 0 additions & 28 deletions
This file was deleted.

Sources/ExtensionKit/SwiftUI/View.swift

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -137,27 +137,6 @@ extension View {
137137
}
138138
}
139139

140-
/// Loading shimmer animation on view
141-
/// - Parameters:
142-
/// - isActive: is shimmer animation active
143-
/// - speed: speed, default: 0.15
144-
/// - angle: angle of animation, default: 70º
145-
/// - Returns: View
146-
public func shimmer(
147-
isActive: Bool = true,
148-
speed: Double = 0.15,
149-
angle: Angle = .init(degrees: 70)
150-
) -> some View {
151-
152-
let view = ShimmerModifier(
153-
isActive: isActive,
154-
speed: speed,
155-
angle: angle
156-
)
157-
158-
return self.modifier(view)
159-
}
160-
161140
/// Overlay border on view
162141
/// - Parameters:
163142
/// - content: ShapeStyle view
@@ -334,7 +313,9 @@ extension View {
334313
/// - Parameter value: repeat upto not including
335314
/// - Returns: View
336315
public func times(_ value: UInt) -> some View {
337-
ForEach(0..<Int(value)) { _ in self }
316+
ForEach(0..<Int(value), id: \.self) { _ in
317+
self
318+
}
338319
}
339320

340321
/// Overlay View on content size

Sources/ExtensionKit/UIKit/UIButton.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,4 @@ public extension UIButton {
9191
}
9292
}
9393

94-
/// Button action for event
95-
/// - Parameters:
96-
/// - controlEvent: Event
97-
/// - closure: Closure to run
98-
func addAction(for controlEvent: UIControl.Event, closure: @escaping () -> Void) {
99-
let wrapper = ButtonClosureWrapper(closure)
100-
addTarget(wrapper, action: #selector(ButtonClosureWrapper.invoke), for: controlEvent)
101-
102-
var possibleKey = "hessekit_ClosureWrapper_\(arc4random())"
103-
while objc_getAssociatedObject(self, &possibleKey) != nil {
104-
possibleKey = "hessekit_ClosureWrapper_\(arc4random())"
105-
}
106-
107-
objc_setAssociatedObject(self, &possibleKey, wrapper, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
108-
}
109-
11094
}

0 commit comments

Comments
 (0)