|
- import UIKit
-
- // MARK: - Протоколы
-
- protocol MainSectionGrid { }
-
- // MARK: - Реализация
-
- extension Main {
- enum SectionGrid {
- static func setupCore(_ core: Main.Core) {
- // Расставляем кнопки в сетке 4x4.
- for (id, p) in memoryItemPositions(M()).enumerated() {
- let btn = core.buttons[id]
- btn.frame =
- CGRect(
- x: p.0,
- y: p.1,
- width: memorySide(),
- height: memorySide()
- )
- btn.backgroundColor = .blue
- }
- }
- }
- }
|