From 79fb84eb10c3527de89acbb65099f092ff14487a Mon Sep 17 00:00:00 2001 From: sanghyeok-kim Date: Fri, 10 Feb 2023 23:05:26 +0900 Subject: [PATCH 1/2] =?UTF-8?q?#30=20refactor:=20Swipe-Rigth-To-Stop?= =?UTF-8?q?=EC=97=90=20=EB=8C=80=ED=95=9C=20SwipeAction=EC=9D=98=20FullSwi?= =?UTF-8?q?pe=EA=B0=92=20true=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Main/TimerTableView/TimerTableViewDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Multimer/Multimer/Presentation/Main/TimerTableView/TimerTableViewDelegate.swift b/Multimer/Multimer/Presentation/Main/TimerTableView/TimerTableViewDelegate.swift index ce9a2ff..6cb35ea 100644 --- a/Multimer/Multimer/Presentation/Main/TimerTableView/TimerTableViewDelegate.swift +++ b/Multimer/Multimer/Presentation/Main/TimerTableView/TimerTableViewDelegate.swift @@ -49,7 +49,7 @@ final class TimerTableViewDelegate: NSObject, UITableViewDelegate { resetAction.backgroundColor = .systemBackground let config = UISwipeActionsConfiguration(actions: [resetAction]) - config.performsFirstActionWithFullSwipe = false + config.performsFirstActionWithFullSwipe = true return config } From a33711c1ffada684bd0fe52c12691517f25454ed Mon Sep 17 00:00:00 2001 From: sanghyeok-kim Date: Fri, 10 Feb 2023 23:06:20 +0900 Subject: [PATCH 2/2] =?UTF-8?q?#30=20remove:=20=EC=B5=9C=EC=B4=88=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=EC=8B=9C=20=EB=82=98=ED=83=80=EB=82=98?= =?UTF-8?q?=EB=8A=94=20Lottie=20=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4?= =?UTF-8?q?=EC=85=98=EC=97=90=EC=84=9C=20tapAnimationView=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SwipeRightToStopNoticeView.swift | 25 +++---------------- .../Presentation/Support/Constant.swift | 1 - 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/Multimer/Multimer/Presentation/Main/CustomView/SwipeRightToStopNoticeView.swift b/Multimer/Multimer/Presentation/Main/CustomView/SwipeRightToStopNoticeView.swift index 1c25cd7..0c649a5 100644 --- a/Multimer/Multimer/Presentation/Main/CustomView/SwipeRightToStopNoticeView.swift +++ b/Multimer/Multimer/Presentation/Main/CustomView/SwipeRightToStopNoticeView.swift @@ -23,13 +23,6 @@ final class SwipeRightToStopNoticeView: UIView { return lottieView }() - private lazy var tapAnimationView: LottieAnimationView = { - let lottieView = LottieAnimationView(name: Constant.LottieAnimationName.tap) - lottieView.loopMode = .playOnce - lottieView.isHidden = true - return lottieView - }() - private lazy var cellImageView: UIImageView = { let imageView = UIImageView(image: UIImage(named: Constant.AssetImageName.swipeCellRightToStop)) imageView.contentMode = .scaleAspectFit @@ -62,13 +55,10 @@ final class SwipeRightToStopNoticeView: UIView { extension SwipeRightToStopNoticeView { func playAnimation() { swipeAnimationView.play { [weak self] _ in - self?.tapAnimationView.isHidden = false - self?.tapAnimationView.play { _ in - UIView.animate(withDuration: 0.75) { - self?.alpha = .zero - } completion: { _ in - self?.isHidden = true - } + UIView.animate(withDuration: 0.75) { + self?.alpha = .zero + } completion: { _ in + self?.isHidden = true } } } @@ -90,7 +80,6 @@ private extension SwipeRightToStopNoticeView { addSubview(backgroundView) addSubview(cellImageView) addSubview(swipeAnimationView) - addSubview(tapAnimationView) addSubview(noticeLabel) backgroundView.translatesAutoresizingMaskIntoConstraints = false @@ -111,12 +100,6 @@ private extension SwipeRightToStopNoticeView { swipeAnimationView.centerXAnchor.constraint(equalTo: centerXAnchor, constant: 20).isActive = true swipeAnimationView.centerYAnchor.constraint(equalTo: centerYAnchor, constant: 40).isActive = true - tapAnimationView.translatesAutoresizingMaskIntoConstraints = false - tapAnimationView.widthAnchor.constraint(equalTo: widthAnchor, multiplier: 0.3).isActive = true - tapAnimationView.heightAnchor.constraint(equalTo: heightAnchor, multiplier: 0.3).isActive = true - tapAnimationView.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 10).isActive = true - tapAnimationView.centerYAnchor.constraint(equalTo: centerYAnchor, constant: 20).isActive = true - noticeLabel.translatesAutoresizingMaskIntoConstraints = false noticeLabel.centerXAnchor.constraint(equalTo: centerXAnchor).isActive = true noticeLabel.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true diff --git a/Multimer/Multimer/Presentation/Support/Constant.swift b/Multimer/Multimer/Presentation/Support/Constant.swift index 607f358..c3c8ce9 100644 --- a/Multimer/Multimer/Presentation/Support/Constant.swift +++ b/Multimer/Multimer/Presentation/Support/Constant.swift @@ -42,7 +42,6 @@ enum Constant { enum LottieAnimationName { static let swipeRightToStopTimer = "swipe-right-to-stop-timer" - static let tap = "tap" } enum UserDefaultsKey {