Files
Woka_Native_iOS/WOKA/Helpers/Animation/ViewButtonAnimation.swift
Bilal a810cfb511 - updated flow for username, made it selectable and move it to login screen
- Update scripts for firebase crashlytics.
- fixed bug for webseries, top ads, if internet not connected again checking it at retry
2024-09-06 20:50:25 +05:30

40 lines
1.1 KiB
Swift

//
// ViewButtonAnimation.swift
// WOKA
//
// Created by Bilal on 24/05/2024.
//
import UIKit
class ViewButtonAnimation {
static let sharedInstance = ViewButtonAnimation()
private init() {}
@objc func btnTapped(in viewController: UIViewController, view: UIView, completionHandler : @escaping () -> Void) {
// Apply click effect animation
UIView.animate(withDuration: 0.1, animations: {
view.transform = CGAffineTransform(scaleX: 0.9, y: 0.9)
}) { _ in
UIView.animate(withDuration: 0.1) {
view.transform = .identity
completionHandler()
}
}
}
@objc func cellTapped(view: UIView, completionHandler : @escaping () -> Void) {
// Apply click effect animation
UIView.animate(withDuration: 0.05, animations: {
view.transform = CGAffineTransform(scaleX: 0.95, y: 0.95)
}) { _ in
UIView.animate(withDuration: 0.05) {
view.transform = .identity
completionHandler()
}
}
}
}