mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-03 18:57:46 +01:00
Set some backgroundcolor (#540)
This commit is contained in:
parent
ea78f884ab
commit
bdbcd128fa
@ -43,14 +43,14 @@ class MastodonLoginView: UIView {
|
|||||||
searchTextField.translatesAutoresizingMaskIntoConstraints = false
|
searchTextField.translatesAutoresizingMaskIntoConstraints = false
|
||||||
searchTextField.backgroundColor = Asset.Scene.Onboarding.textFieldBackground.color
|
searchTextField.backgroundColor = Asset.Scene.Onboarding.textFieldBackground.color
|
||||||
searchTextField.layer.cornerRadius = 10 //TODO: Change mask for
|
searchTextField.layer.cornerRadius = 10 //TODO: Change mask for
|
||||||
searchTextField.placeholder = "Search for your server"
|
searchTextField.placeholder = "Search for your server" //TODO: @zeitschlag Localization
|
||||||
searchTextField.leftView = UIImageView(image: UIImage(systemName: "magnifyingglass"))
|
searchTextField.leftView = UIImageView(image: UIImage(systemName: "magnifyingglass"))
|
||||||
searchTextField.leftViewMode = .always
|
searchTextField.leftViewMode = .always
|
||||||
|
|
||||||
tableView = UITableView()
|
tableView = UITableView()
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
//TODO: @zeitchlag Cell
|
tableView.backgroundColor = Asset.Scene.Onboarding.background.color
|
||||||
|
|
||||||
navigationActionView = NavigationActionView()
|
navigationActionView = NavigationActionView()
|
||||||
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ class MastodonLoginView: UIView {
|
|||||||
addSubview(searchTextField)
|
addSubview(searchTextField)
|
||||||
addSubview(tableView)
|
addSubview(tableView)
|
||||||
addSubview(navigationActionView)
|
addSubview(navigationActionView)
|
||||||
backgroundColor = .systemBackground
|
backgroundColor = Asset.Scene.Onboarding.background.color
|
||||||
|
|
||||||
setupConstraints()
|
setupConstraints()
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
import MastodonSDK
|
import MastodonSDK
|
||||||
import MastodonCore
|
import MastodonCore
|
||||||
|
import MastodonAsset
|
||||||
|
|
||||||
protocol MastodonLoginViewControllerDelegate: AnyObject {
|
protocol MastodonLoginViewControllerDelegate: AnyObject {
|
||||||
func backButtonPressed(_ viewController: MastodonLoginViewController)
|
func backButtonPressed(_ viewController: MastodonLoginViewController)
|
||||||
@ -73,6 +74,15 @@ class MastodonLoginViewController: UIViewController {
|
|||||||
cell.contentConfiguration = configuration
|
cell.contentConfiguration = configuration
|
||||||
cell.accessoryType = .disclosureIndicator
|
cell.accessoryType = .disclosureIndicator
|
||||||
|
|
||||||
|
if #available(iOS 16.0, *) {
|
||||||
|
var backgroundConfiguration = cell.defaultBackgroundConfiguration()
|
||||||
|
backgroundConfiguration.backgroundColor = Asset.Scene.Onboarding.textFieldBackground.color
|
||||||
|
|
||||||
|
cell.backgroundConfiguration = backgroundConfiguration
|
||||||
|
} else {
|
||||||
|
cell.backgroundColor = .systemBackground
|
||||||
|
}
|
||||||
|
|
||||||
return cell
|
return cell
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user