Style elements (IOS-235)
This commit is contained in:
parent
67786e1675
commit
ceca4f6887
|
@ -55,10 +55,11 @@ final class HomeTimelineViewController: UIViewController, NeedsDependency, Media
|
||||||
|
|
||||||
viewModel.timelineContext = .following
|
viewModel.timelineContext = .following
|
||||||
viewModel.dataController.records = []
|
viewModel.dataController.records = []
|
||||||
|
|
||||||
viewModel.loadLatestStateMachine.enter(HomeTimelineViewModel.LoadLatestState.LoadingManually.self)
|
viewModel.loadLatestStateMachine.enter(HomeTimelineViewModel.LoadLatestState.LoadingManually.self)
|
||||||
button.setAttributedTitle(
|
button.setAttributedTitle(
|
||||||
.init(string: "Following", attributes: [
|
.init(string: "Following", attributes: [
|
||||||
.font: UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 16, weight: .bold))
|
.font: UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 20, weight: .semibold))
|
||||||
]),
|
]),
|
||||||
for: .normal)
|
for: .normal)
|
||||||
button.sizeToFit()
|
button.sizeToFit()
|
||||||
|
@ -68,10 +69,11 @@ final class HomeTimelineViewController: UIViewController, NeedsDependency, Media
|
||||||
|
|
||||||
viewModel.timelineContext = .community
|
viewModel.timelineContext = .community
|
||||||
viewModel.dataController.records = []
|
viewModel.dataController.records = []
|
||||||
|
|
||||||
viewModel.loadLatestStateMachine.enter(HomeTimelineViewModel.LoadLatestState.LoadingManually.self)
|
viewModel.loadLatestStateMachine.enter(HomeTimelineViewModel.LoadLatestState.LoadingManually.self)
|
||||||
button.setAttributedTitle(
|
button.setAttributedTitle(
|
||||||
.init(string: "Local", attributes: [
|
.init(string: "Local", attributes: [
|
||||||
.font: UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 16, weight: .bold))
|
.font: UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 20, weight: .semibold))
|
||||||
]),
|
]),
|
||||||
for: .normal)
|
for: .normal)
|
||||||
button.sizeToFit()
|
button.sizeToFit()
|
||||||
|
@ -82,20 +84,19 @@ final class HomeTimelineViewController: UIViewController, NeedsDependency, Media
|
||||||
|
|
||||||
button.setAttributedTitle(
|
button.setAttributedTitle(
|
||||||
.init(string: "Following", attributes: [
|
.init(string: "Following", attributes: [
|
||||||
.font: UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 16, weight: .bold))
|
.font: UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 20, weight: .semibold))
|
||||||
]),
|
]),
|
||||||
for: .normal)
|
for: .normal)
|
||||||
let imageConfiguration = UIImage.SymbolConfiguration(pointSize: 16, weight: .bold, scale: .medium)
|
|
||||||
// button.setImage(
|
let imageConfiguration = UIImage.SymbolConfiguration(paletteColors: [.secondaryLabel, .secondarySystemFill])
|
||||||
// .init(systemName: "chevron.down.circle.fill", withConfiguration: imageConfiguration)?.withRenderingMode(.alwaysTemplate),
|
.applying(UIImage.SymbolConfiguration(textStyle: .subheadline))
|
||||||
// for: .normal)
|
.applying(UIImage.SymbolConfiguration(pointSize: 16, weight: .bold, scale: .medium))
|
||||||
// button.tintColor = Asset.Colors.disabled.color
|
|
||||||
// button.setTitleColor(Asset.Colors.Label.primary.color, for: .normal)
|
|
||||||
button.configuration = {
|
button.configuration = {
|
||||||
var config = UIButton.Configuration.plain()
|
var config = UIButton.Configuration.plain()
|
||||||
config.contentInsets = .init(top: 0, leading: 0, bottom: 0, trailing: 0)
|
config.contentInsets = .init(top: 0, leading: 0, bottom: 0, trailing: 0)
|
||||||
config.imagePadding = 8
|
config.imagePadding = 8
|
||||||
config.image = .init(systemName: "chevron.down.circle.fill", withConfiguration: imageConfiguration)?.withRenderingMode(.alwaysTemplate).withTintColor(Asset.Colors.disabled.color)
|
config.image = UIImage(systemName: "chevron.down.circle.fill", withConfiguration: imageConfiguration)
|
||||||
return config
|
return config
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue