perf(training): 优化答题自动保存与培训页面交互

This commit is contained in:
2026-10-19 15:50:13 +08:00
parent 19e29a6970
commit fdb4550ba8
11 changed files with 1350 additions and 255 deletions
@@ -56,7 +56,6 @@ final class TrainingCenterViewController: TrainingBaseViewController {
hero.spacing = 8
hero.backgroundColor = UIColor(red: 45/255, green: 128/255, blue: 250/255, alpha: 1)
hero.layer.cornerRadius = 14
hero.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMaxYCorner]
hero.isLayoutMarginsRelativeArrangement = true
hero.layoutMargins = UIEdgeInsets(top: 19, left: 17, bottom: 18, right: 17)
hero.addArrangedSubview(greetingLabel)
@@ -83,7 +82,11 @@ final class TrainingCenterViewController: TrainingBaseViewController {
}
hero.setCustomSpacing(18, after: titleLabel)
hero.addArrangedSubview(stats)
header.addArrangedSubview(hero)
let heroContainer = UIStackView(arrangedSubviews: [hero])
heroContainer.axis = .vertical
heroContainer.isLayoutMarginsRelativeArrangement = true
heroContainer.layoutMargins = UIEdgeInsets(top: 12, left: 13, bottom: 12, right: 13)
header.addArrangedSubview(heroContainer)
let body = UIStackView()
body.axis = .vertical
body.spacing = 11