co-maps/iphone/Maps/UI/AvailableArea/TrackRecordingButtonArea.swift
2025-11-22 13:58:55 +01:00

21 lines
723 B
Swift

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