diff --git a/iOS/AppAssets.swift b/iOS/AppAssets.swift index 9c06cb118..ffb8c4f0d 100644 --- a/iOS/AppAssets.swift +++ b/iOS/AppAssets.swift @@ -60,8 +60,6 @@ struct AppAssets { return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.starColor.cgColor) }() - static let tickMarkColor = UIColor(named: "tickMarkColor")! - static let timelineStarImage: UIImage = { let image = UIImage(systemName: "star.fill")! return image.withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal) diff --git a/iOS/Resources/Assets.xcassets/tickMarkColor.colorset/Contents.json b/iOS/Resources/Assets.xcassets/tickMarkColor.colorset/Contents.json deleted file mode 100644 index 8ea7f403a..000000000 --- a/iOS/Resources/Assets.xcassets/tickMarkColor.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - }, - "colors" : [ - { - "idiom" : "universal", - "color" : { - "color-space" : "srgb", - "components" : { - "red" : "228", - "alpha" : "1.000", - "blue" : "230", - "green" : "228" - } - } - }, - { - "idiom" : "universal", - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "red" : "59", - "alpha" : "1.000", - "blue" : "63", - "green" : "59" - } - } - } - ] -} \ No newline at end of file diff --git a/iOS/UIKit Extensions/TickMarkSlider.swift b/iOS/UIKit Extensions/TickMarkSlider.swift deleted file mode 100644 index 91f023061..000000000 --- a/iOS/UIKit Extensions/TickMarkSlider.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// TickMarkSlider.swift -// NetNewsWire-iOS -// -// Created by Maurice Parker on 11/8/19. -// Copyright © 2019 Ranchero Software. All rights reserved. -// - -import UIKit - -@available(*, deprecated, message: "UISliders in iOS 26 come with tickmarks.") -final class TickMarkSlider: UISlider { - - private var enableFeedback = false - private let feedbackGenerator = UISelectionFeedbackGenerator() - - private var roundedValue: Float? - override var value: Float { - didSet { - let testValue = value.rounded() - if testValue != roundedValue && enableFeedback && value.truncatingRemainder(dividingBy: 1) == 0 { - roundedValue = testValue - feedbackGenerator.selectionChanged() - } - } - } - - func addTickMarks() { - - enableFeedback = true - - let numberOfGaps = Int(maximumValue) - Int(minimumValue) - - var gapLayoutGuides = [UILayoutGuide]() - - for i in 0...numberOfGaps { - - let tick = UIView() - tick.translatesAutoresizingMaskIntoConstraints = false - tick.backgroundColor = AppAssets.tickMarkColor - insertSubview(tick, at: 0) - - tick.widthAnchor.constraint(equalToConstant: 3).isActive = true - tick.heightAnchor.constraint(equalToConstant: 10).isActive = true - tick.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true - - if i == 0 { - tick.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true - } - - if let lastGapLayoutGuild = gapLayoutGuides.last { - lastGapLayoutGuild.trailingAnchor.constraint(equalTo: tick.leadingAnchor).isActive = true - } - - if i != numberOfGaps { - let gapLayoutGuild = UILayoutGuide() - gapLayoutGuides.append(gapLayoutGuild) - addLayoutGuide(gapLayoutGuild) - tick.trailingAnchor.constraint(equalTo: gapLayoutGuild.leadingAnchor).isActive = true - } else { - tick.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true - } - - } - - if let firstGapLayoutGuild = gapLayoutGuides.first { - for i in 1.. Bool { - let result = super.continueTracking(touch, with: event) - value = value.rounded() - return result - } - - override func endTracking(_ touch: UITouch?, with event: UIEvent?) { - value = value.rounded() - } - -}