Add + Update screen : PlayMusic

This commit is contained in:
mrustaa
2024-07-31 15:59:53 +03:00
parent 18c90f0c63
commit 85d52cd837
107 changed files with 2883 additions and 392 deletions
@@ -37,6 +37,7 @@ class Button: UIButton {
/// Simple tap implementation
typealias Closure = () -> ()
typealias ClosureClick = (_ down: Bool) -> ()
class ClosureSleeve {
@@ -59,5 +60,21 @@ extension UIControl {
sleeve,
objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
}
func tapClassic(_ closure: @escaping ClosureClick) {
self.tap(for: .touchDown) { // [weak self] in
closure(true)
}
self.tap(for: .touchUpInside) { // [weak self] in
closure(false)
}
self.tap(for: .touchUpOutside) { // [weak self] in
closure(false)
}
self.tap(for: .touchCancel) { // [weak self] in
closure(false)
}
}
}