Архитектурный шаблон "Мрак в моделях" на нескольких языках и платформах
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
603B

  1. import UIKit
  2. // MARK: - Протоколы
  3. protocol MainSectionSelection { }
  4. // MARK: - Реализация
  5. extension Main {
  6. enum SectionSelection {
  7. static func setupCore(_ core: Main.Core) {
  8. // Учитываем нажатия кнопок.
  9. for btn in core.buttons {
  10. btn.addTarget(core, action: #selector(Main.Core.selectButton), for: .touchUpInside)
  11. }
  12. // Выводим номер нажатой кнопки.
  13. core.didSelectButton
  14. .sink { i in print("ИГР MainSS.setupC didSB: '\(i)'") }
  15. .store(in: &core.subscriptions)
  16. }
  17. }
  18. }