Tints added to iOS Account controllers

This commit is contained in:
Stuart Breckenridge 2020-10-27 12:25:15 +08:00
parent 5190bf0577
commit ee88e83548
No known key found for this signature in database
GPG Key ID: 802A426F493CA19C
6 changed files with 9 additions and 9 deletions

View File

@ -37,7 +37,7 @@ class CloudKitAccountViewController: UITableViewController {
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 0 {
let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView
headerView.imageView.image = AppAssets.image(for: .cloudKit)
headerView.imageView.image = AppAssets.image(for: .cloudKit)?.tinted(color: AccountType.cloudKit.iconColor())
return headerView
} else {
return super.tableView(tableView, viewForHeaderInSection: section)

View File

@ -51,7 +51,7 @@ class FeedWranglerAccountViewController: UITableViewController {
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 0 {
let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView
headerView.imageView.image = AppAssets.image(for: .feedWrangler)
headerView.imageView.image = AppAssets.image(for: .feedWrangler)?.tinted(color: AccountType.feedWrangler.iconColor())
return headerView
} else {
return super.tableView(tableView, viewForHeaderInSection: section)

View File

@ -52,7 +52,7 @@ class FeedbinAccountViewController: UITableViewController {
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 0 {
let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView
headerView.imageView.image = AppAssets.image(for: .feedbin)
headerView.imageView.image = AppAssets.image(for: .feedbin)?.tinted(color: AccountType.feedbin.iconColor())
return headerView
} else {
return super.tableView(tableView, viewForHeaderInSection: section)

View File

@ -41,7 +41,7 @@ class LocalAccountViewController: UITableViewController {
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 0 {
let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView
headerView.imageView.image = AppAssets.image(for: .onMyMac)
headerView.imageView.image = AppAssets.image(for: .onMyMac)?.tinted(color: AccountType.onMyMac.iconColor())
return headerView
} else {
return super.tableView(tableView, viewForHeaderInSection: section)

View File

@ -52,7 +52,7 @@ class NewsBlurAccountViewController: UITableViewController {
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 0 {
let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView
headerView.imageView.image = AppAssets.image(for: .newsBlur)
headerView.imageView.image = AppAssets.image(for: .newsBlur)?.tinted(color: AccountType.newsBlur.iconColor())
return headerView
} else {
return super.tableView(tableView, viewForHeaderInSection: section)

View File

@ -187,13 +187,13 @@ class ReaderAPIAccountViewController: UITableViewController {
if let accountType = accountType {
switch accountType {
case .bazQux:
return AppAssets.accountBazQuxImage
return AppAssets.accountBazQuxImage.tinted(color: accountType.iconColor())
case .inoreader:
return AppAssets.accountInoreaderImage
return AppAssets.accountInoreaderImage.tinted(color: accountType.iconColor())
case .theOldReader:
return AppAssets.accountTheOldReaderImage
return AppAssets.accountTheOldReaderImage.tinted(color: accountType.iconColor())
case .freshRSS:
return AppAssets.accountFreshRSSImage
return AppAssets.accountFreshRSSImage.tinted(color: accountType.iconColor())
default:
return nil
}