Skip to content

Commit

Permalink
fix: fix tapping indicator logic
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyingtao committed Jun 21, 2023
1 parent c525bfd commit 3272b80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Example/InchwormExample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ViewController: UIViewController {
normalIconImage: UIImage(named: "settings")!.tinted(with: UIColor.white)!.cgImage!,
dimmedIconImage: UIImage(named: "settings")!.tinted(with: UIColor.gray)!.cgImage!)

let model3 = ProcessIndicatorModel(sliderValueRangeType: .bilateral(limit: 50, defaultValue: -25),
let model3 = ProcessIndicatorModel(sliderValueRangeType: .bilateral(limit: 50, defaultValue: 0),
normalIconImage: UIImage(named: "ic_camera_front")!.tinted(with: UIColor.white)!.cgImage!,
dimmedIconImage: UIImage(named: "ic_camera_front")!.tinted(with: UIColor.gray)!.cgImage!)

Expand Down
8 changes: 4 additions & 4 deletions Inchworm/Source/ProcessIndicatorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ class ProcessIndicatorView: UIView {

@objc func handleTap() {
if isActive {
if status == .tempReset || status == .editingOthers {
status = .editingSelf
delegate?.didRemoveTempReset(self)
} else {
if status == .editingSelf {
status = .tempReset
delegate?.didTempReset(self)
} else {
status = .editingSelf
delegate?.didRemoveTempReset(self)
}
} else {
isActive = true
Expand Down

0 comments on commit 3272b80

Please sign in to comment.