Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)

To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
This commit is contained in:
Konstantin Pastbin
2025-04-13 16:37:30 +07:00
commit e3e4a1985a
12931 changed files with 13195100 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
class DimmedModalPresentationController: UIPresentationController {
private lazy var onTapGr: UITapGestureRecognizer = {
return UITapGestureRecognizer(target: self, action: #selector(onTap))
}()
private lazy var dimView: UIView = {
let view = UIView()
view.setStyle(.blackStatusBarBackground)
if isCancellable {
view.addGestureRecognizer(onTapGr)
}
return view
}()
let isCancellable: Bool
required init(presentedViewController: UIViewController, presenting presentingViewController: UIViewController?, cancellable: Bool = true) {
isCancellable = cancellable
super.init(presentedViewController: presentedViewController, presenting: presentingViewController)
}
@objc private func onTap() {
presentingViewController.dismiss(animated: true, completion: nil)
}
override func presentationTransitionWillBegin() {
guard let containerView = containerView else { return }
containerView.addSubview(dimView)
dimView.frame = containerView.bounds
dimView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
dimView.alpha = 0
presentingViewController.transitionCoordinator?.animate(alongsideTransition: { _ in
self.dimView.alpha = 1
})
}
override func presentationTransitionDidEnd(_ completed: Bool) {
if !completed { dimView.removeFromSuperview() }
}
override func dismissalTransitionWillBegin() {
presentingViewController.transitionCoordinator?.animate(alongsideTransition: { _ in
self.dimView.alpha = 0
})
}
override func dismissalTransitionDidEnd(_ completed: Bool) {
if completed { dimView.removeFromSuperview() }
}
}