diff --git a/Thimra/Base/Extension/UIColor+SPAdd.swift b/Thimra/Base/Extension/UIColor+SPAdd.swift index 222e126..6a06d27 100644 --- a/Thimra/Base/Extension/UIColor+SPAdd.swift +++ b/Thimra/Base/Extension/UIColor+SPAdd.swift @@ -144,5 +144,21 @@ extension UIColor { static func colorAFB8BF(alpha: CGFloat = 1) -> UIColor { return color(hex: 0xAFB8BF, alpha: alpha) } + + static func colorFF0000(alpha: CGFloat = 1) -> UIColor { + return color(hex: 0xFF0000, alpha: alpha) + } + + static func color1C1A1C(alpha: CGFloat = 1) -> UIColor { + return color(hex: 0x1C1A1C, alpha: alpha) + } + + static func color621C14(alpha: CGFloat = 1) -> UIColor { + return color(hex: 0x621C14, alpha: alpha) + } + + static func color5A5C67(alpha: CGFloat = 1) -> UIColor { + return color(hex: 0x5A5C67, alpha: alpha) + } } diff --git a/Thimra/Class/Player/View/SPEpisodeCell.swift b/Thimra/Class/Player/View/SPEpisodeCell.swift index 7bc1c15..570206c 100644 --- a/Thimra/Class/Player/View/SPEpisodeCell.swift +++ b/Thimra/Class/Player/View/SPEpisodeCell.swift @@ -18,29 +18,30 @@ class SPEpisodeCell: SPCollectionViewCell { var sp_isSelected: Bool = false { didSet { - textLabel.isHidden = sp_isSelected - playImageView.isHidden = !sp_isSelected + if sp_isSelected { + contentView.backgroundColor = .color621C14() + contentView.layer.borderColor = UIColor.colorFF0000().cgColor + + } else { + contentView.backgroundColor = .color1C1A1C() + contentView.layer.borderColor = UIColor.color1C1A1C().cgColor + } } } private lazy var textLabel: UILabel = { let label = UILabel() - label.font = .fontLight(ofSize: 14) - label.textColor = .colorD2D2D2() + label.font = .fontMedium(ofSize: 16) + label.textColor = .colorFFFFFF() return label }() - private lazy var playImageView: UIImageView = { - let imageView = UIImageView(image: UIImage(named: "play_icon_01")) - return imageView - }() - override init(frame: CGRect) { super.init(frame: frame) - contentView.backgroundColor = .colorFFFFFF(alpha: 0.14) - contentView.layer.cornerRadius = 7 + contentView.layer.cornerRadius = 8 contentView.layer.masksToBounds = true + contentView.layer.borderWidth = 2 _setupUI() @@ -55,15 +56,11 @@ extension SPEpisodeCell { private func _setupUI() { contentView.addSubview(textLabel) - contentView.addSubview(playImageView) textLabel.snp.makeConstraints { make in make.center.equalToSuperview() } - playImageView.snp.makeConstraints { make in - make.center.equalToSuperview() - } } diff --git a/Thimra/Class/Player/View/SPEpisodeMenuView.swift b/Thimra/Class/Player/View/SPEpisodeMenuView.swift index 49d413f..76c6fe9 100644 --- a/Thimra/Class/Player/View/SPEpisodeMenuView.swift +++ b/Thimra/Class/Player/View/SPEpisodeMenuView.swift @@ -10,7 +10,7 @@ import UIKit class SPEpisodeMenuView: UIView { override var intrinsicContentSize: CGSize { - return CGSize(width: kSPScreenWidth, height: 32) + return CGSize(width: kSPScreenWidth, height: 30) } var didSelectedIndex: ((_ index: Int) -> Void)? @@ -34,12 +34,13 @@ class SPEpisodeMenuView: UIView { private lazy var buttonArr: [UIButton] = [] //MARK: UI属性 - private lazy var progressView: SPGradientView = { - let view = SPGradientView() - view.colors = [UIColor.colorF56490().cgColor, UIColor.colorBF6BFF().cgColor] - view.startPoint = .init(x: 0, y: 0.5) - view.endPoint = .init(x: 1, y: 0.5) - view.locations = [0, 1] + private lazy var progressView: UIView = { + let view = UIView() + view.backgroundColor = .colorFF0000() +// view.colors = [UIColor.colorF56490().cgColor, UIColor.colorBF6BFF().cgColor] +// view.startPoint = .init(x: 0, y: 0.5) +// view.endPoint = .init(x: 1, y: 0.5) +// view.locations = [0, 1] return view }() @@ -71,19 +72,19 @@ class SPEpisodeMenuView: UIView { dataArr.enumerated().forEach { let normalStrig = NSMutableAttributedString(string: $1) - normalStrig.color = .color9D9D9D() - normalStrig.font = .fontLight(ofSize: 14) + normalStrig.color = .colorFFFFFF() + normalStrig.font = .fontMedium(ofSize: 12) - let selectedString = NSMutableAttributedString(string: $1) - selectedString.color = .colorF564B6() - selectedString.font = .fontMedium(ofSize: 14) +// let selectedString = NSMutableAttributedString(string: $1) +// selectedString.color = .colorF564B6() +// selectedString.font = .fontMedium(ofSize: 14) let button = UIButton(type: .custom) button.tag = $0 button.setAttributedTitle(normalStrig, for: .normal) - button.setAttributedTitle(selectedString, for: .selected) - button.setAttributedTitle(selectedString, for: [.selected, .highlighted]) +// button.setAttributedTitle(selectedString, for: .selected) +// button.setAttributedTitle(selectedString, for: [.selected, .highlighted]) button.addTarget(self, action: #selector(handleButton), for: .touchUpInside) button.isSelected = $0 == selectedIndex @@ -93,20 +94,20 @@ class SPEpisodeMenuView: UIView { if previousButton == nil { button.snp.makeConstraints { make in make.top.left.equalToSuperview() - make.height.equalTo(32) + make.height.equalTo(30) } } else if let previousButton = previousButton, count - 1 == $0 { button.snp.makeConstraints { make in make.top.equalToSuperview() make.left.equalTo(previousButton.snp.right).offset(25) - make.height.equalTo(32) + make.height.equalTo(30) make.right.equalToSuperview() } } else if let previousButton = previousButton { button.snp.makeConstraints { make in make.top.equalToSuperview() make.left.equalTo(previousButton.snp.right).offset(25) - make.height.equalTo(32) + make.height.equalTo(30) } } diff --git a/Thimra/Class/Player/View/SPEpisodeView.swift b/Thimra/Class/Player/View/SPEpisodeView.swift index 3b7cc1a..fbaee3a 100644 --- a/Thimra/Class/Player/View/SPEpisodeView.swift +++ b/Thimra/Class/Player/View/SPEpisodeView.swift @@ -68,13 +68,13 @@ class SPEpisodeView: HWPanModalContentView { }() private lazy var collectionViewLayout: UICollectionViewFlowLayout = { - let itemWidth = floor((kSPScreenWidth - 10 * 4 - 30) / 5) + let itemWidth = floor((kSPScreenWidth - 7 * 4 - 32) / 5) let layout = UICollectionViewFlowLayout() - layout.itemSize = .init(width: itemWidth, height: 50) - layout.minimumLineSpacing = 10 - layout.minimumInteritemSpacing = 10 - layout.sectionInset = .init(top: 0, left: 15, bottom: 0, right: 15) + layout.itemSize = .init(width: itemWidth, height: 54) + layout.minimumLineSpacing = 7 + layout.minimumInteritemSpacing = 7 + layout.sectionInset = .init(top: 0, left: 16, bottom: 0, right: 16) return layout }() @@ -88,8 +88,8 @@ class SPEpisodeView: HWPanModalContentView { private lazy var indicatorView: UIView = { let view = UIView() - view.backgroundColor = .colorFFFFFF() - view.layer.cornerRadius = 2 + view.backgroundColor = .color5A5C67() + view.layer.cornerRadius = 2.5 view.layer.masksToBounds = true return view }() @@ -105,8 +105,9 @@ class SPEpisodeView: HWPanModalContentView { private lazy var titleLabel: UILabel = { let label = UILabel() - label.font = .fontMedium(ofSize: 14) + label.font = .fontBold(ofSize: 14) label.textColor = .colorFFFFFF() + label.numberOfLines = 2 return label }() @@ -200,9 +201,9 @@ extension SPEpisodeView { self.indicatorView.snp.makeConstraints { make in make.centerX.equalToSuperview() - make.top.equalToSuperview().offset(15) - make.width.equalTo(30) - make.height.equalTo(4) + make.top.equalToSuperview().offset(10) + make.width.equalTo(40) + make.height.equalTo(5) } self.coverImageView.snp.makeConstraints { make in @@ -220,8 +221,9 @@ extension SPEpisodeView { self.desLabel.snp.makeConstraints { make in make.left.equalTo(self.titleLabel) - make.right.lessThanOrEqualToSuperview().offset(-15) - make.top.equalTo(self.coverImageView.snp.bottom).offset(8) + make.right.lessThanOrEqualToSuperview().offset(-16) +// make.top.equalTo(self.coverImageView.snp.bottom).offset(8) + make.top.equalTo(titleLabel.snp.bottom).offset(6) } self.menuView.snp.makeConstraints { make in @@ -230,9 +232,9 @@ extension SPEpisodeView { } self.lineView.snp.makeConstraints { make in - make.left.equalToSuperview().offset(15) + make.left.equalToSuperview().offset(16) make.centerX.equalToSuperview() - make.top.equalTo(self.desLabel.snp.bottom).offset(46) + make.top.equalTo(self.coverImageView.snp.bottom).offset(46) make.height.equalTo(0.7) } diff --git a/Thimra/Source/Assets.xcassets/icon/page_indicator_icon_01.imageset/Contents.json b/Thimra/Source/Assets.xcassets/icon/page_indicator_icon_01.imageset/Contents.json deleted file mode 100644 index 76d0040..0000000 --- a/Thimra/Source/Assets.xcassets/icon/page_indicator_icon_01.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "路径 497@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "路径 497@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Thimra/Source/Assets.xcassets/icon/page_indicator_icon_01.imageset/路径 497@2x.png b/Thimra/Source/Assets.xcassets/icon/page_indicator_icon_01.imageset/路径 497@2x.png deleted file mode 100644 index cd3a7c8..0000000 Binary files a/Thimra/Source/Assets.xcassets/icon/page_indicator_icon_01.imageset/路径 497@2x.png and /dev/null differ diff --git a/Thimra/Source/Assets.xcassets/icon/page_indicator_icon_01.imageset/路径 497@3x.png b/Thimra/Source/Assets.xcassets/icon/page_indicator_icon_01.imageset/路径 497@3x.png deleted file mode 100644 index 9c71617..0000000 Binary files a/Thimra/Source/Assets.xcassets/icon/page_indicator_icon_01.imageset/路径 497@3x.png and /dev/null differ diff --git a/Thimra/Source/Assets.xcassets/icon/play_icon_01.imageset/Contents.json b/Thimra/Source/Assets.xcassets/icon/play_icon_01.imageset/Contents.json deleted file mode 100644 index d6a5fe3..0000000 --- a/Thimra/Source/Assets.xcassets/icon/play_icon_01.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "play1@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "play1@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Thimra/Source/Assets.xcassets/icon/play_icon_01.imageset/play1@2x.png b/Thimra/Source/Assets.xcassets/icon/play_icon_01.imageset/play1@2x.png deleted file mode 100644 index 8b4d23f..0000000 Binary files a/Thimra/Source/Assets.xcassets/icon/play_icon_01.imageset/play1@2x.png and /dev/null differ diff --git a/Thimra/Source/Assets.xcassets/icon/play_icon_01.imageset/play1@3x.png b/Thimra/Source/Assets.xcassets/icon/play_icon_01.imageset/play1@3x.png deleted file mode 100644 index 0fd4d72..0000000 Binary files a/Thimra/Source/Assets.xcassets/icon/play_icon_01.imageset/play1@3x.png and /dev/null differ diff --git a/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/Contents.json b/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/Contents.json index 1057d71..6f02c5c 100644 --- a/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/Contents.json +++ b/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/Contents.json @@ -5,12 +5,12 @@ "scale" : "1x" }, { - "filename" : "背景@2x.png", + "filename" : "背景图@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "背景@3x.png", + "filename" : "背景图@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景@2x.png b/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景@2x.png deleted file mode 100644 index 35a3bb5..0000000 Binary files a/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景@2x.png and /dev/null differ diff --git a/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景@3x.png b/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景@3x.png deleted file mode 100644 index cab70a6..0000000 Binary files a/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景@3x.png and /dev/null differ diff --git a/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景图@2x.png b/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景图@2x.png new file mode 100644 index 0000000..467909f Binary files /dev/null and b/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景图@2x.png differ diff --git a/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景图@3x.png b/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景图@3x.png new file mode 100644 index 0000000..413adb4 Binary files /dev/null and b/Thimra/Source/Assets.xcassets/image/episode_bg_image_01.imageset/背景图@3x.png differ