Files
comaps/iphone/Maps/UI/AvailableArea/ModeButtonArea.swift
Yannik Bloscheck 94e20d437d WIP: Modes
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>

m

Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-20 18:01:07 +01:00

22 lines
656 B
Swift

final class ModeButtonArea: AvailableArea {
override func isAreaAffectingView(_ other: UIView) -> Bool {
return !other.modeButtonAreaAffectDirections.isEmpty
}
override func addAffectingView(_ other: UIView) {
let ov = other.modeButtonAreaAffectView
let directions = ov.modeButtonAreaAffectDirections
addConstraints(otherView: ov, directions: directions)
}
override func notifyObserver() {
MWMModeButtonViewController.updateAvailableArea(areaFrame)
}
}
extension UIView {
@objc var modeButtonAreaAffectDirections: MWMAvailableAreaAffectDirections { return [] }
var modeButtonAreaAffectView: UIView { return self }
}