diff --git a/Mastodon/Scene/Onboarding/ServerRules/Cell/ServerRulesTableViewCell.swift b/Mastodon/Scene/Onboarding/ServerRules/Cell/ServerRulesTableViewCell.swift index bb51cdfcf..1c6705de6 100644 --- a/Mastodon/Scene/Onboarding/ServerRules/Cell/ServerRulesTableViewCell.swift +++ b/Mastodon/Scene/Onboarding/ServerRules/Cell/ServerRulesTableViewCell.swift @@ -49,7 +49,7 @@ extension ServerRulesTableViewCell { private func _init() { selectionStyle = .none - backgroundColor = .clear +// backgroundColor = .systemBackground indexImageView.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(indexImageView) @@ -71,15 +71,6 @@ extension ServerRulesTableViewCell { contentView.bottomAnchor.constraint(greaterThanOrEqualTo: ruleLabel.bottomAnchor, constant: 11), ruleLabel.centerYAnchor.constraint(equalTo: contentView.centerYAnchor), ]) - - separatorLine.translatesAutoresizingMaskIntoConstraints = false - contentView.addSubview(separatorLine) - NSLayoutConstraint.activate([ - separatorLine.leadingAnchor.constraint(equalTo: ruleLabel.leadingAnchor), - separatorLine.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), - separatorLine.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), - separatorLine.heightAnchor.constraint(equalToConstant: UIView.separatorLineHeight(of: contentView)).priority(.required - 1), - ]) } } diff --git a/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift b/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift index 35be5c2d9..f1287227d 100644 --- a/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift +++ b/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift @@ -28,12 +28,11 @@ final class MastodonServerRulesViewController: UIViewController, NeedsDependency var viewModel: MastodonServerRulesViewModel! let tableView: UITableView = { - let tableView = UITableView() + let tableView = UITableView(frame: .zero, style: .insetGrouped) tableView.register(OnboardingHeadlineTableViewCell.self, forCellReuseIdentifier: String(describing: OnboardingHeadlineTableViewCell.self)) tableView.register(ServerRulesTableViewCell.self, forCellReuseIdentifier: String(describing: ServerRulesTableViewCell.self)) tableView.rowHeight = UITableView.automaticDimension - tableView.separatorStyle = .none - tableView.backgroundColor = .clear + tableView.backgroundColor = .secondarySystemGroupedBackground tableView.keyboardDismissMode = .onDrag tableView.sectionHeaderTopPadding = 0 return tableView