From ae20a290136b8b250d684c3f92a04f1213add37f Mon Sep 17 00:00:00 2001 From: sunxiaojian Date: Thu, 8 Apr 2021 16:12:04 +0800 Subject: [PATCH] fix: make seeAll button and clear button highlight when user tapping --- Mastodon/Scene/Search/SearchViewController.swift | 4 ++-- .../Scene/Search/View/SearchRecommendCollectionHeader.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Mastodon/Scene/Search/SearchViewController.swift b/Mastodon/Scene/Search/SearchViewController.swift index d506ab99..b98a34b9 100644 --- a/Mastodon/Scene/Search/SearchViewController.swift +++ b/Mastodon/Scene/Search/SearchViewController.swift @@ -99,8 +99,8 @@ final class SearchViewController: UIViewController, NeedsDependency { return label }() - let clearSearchHistoryButton: UIButton = { - let button = UIButton(type: .custom) + let clearSearchHistoryButton: HighlightDimmableButton = { + let button = HighlightDimmableButton(type: .custom) button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal) button.setTitle(L10n.Scene.Search.Searching.clear, for: .normal) return button diff --git a/Mastodon/Scene/Search/View/SearchRecommendCollectionHeader.swift b/Mastodon/Scene/Search/View/SearchRecommendCollectionHeader.swift index 216f18f9..bc5bd766 100644 --- a/Mastodon/Scene/Search/View/SearchRecommendCollectionHeader.swift +++ b/Mastodon/Scene/Search/View/SearchRecommendCollectionHeader.swift @@ -25,8 +25,8 @@ class SearchRecommendCollectionHeader: UIView { return label }() - let seeAllButton: UIButton = { - let button = UIButton(type: .custom) + let seeAllButton: HighlightDimmableButton = { + let button = HighlightDimmableButton(type: .custom) button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal) button.setTitle(L10n.Scene.Search.Recommend.buttonText, for: .normal) return button