mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-21 18:53:51 +00:00
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com> m Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
22 lines
656 B
Swift
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 }
|
|
}
|