[iOS] fix zoom buttons when PP open

https://jira.mail.ru/browse/MAPSME-13520
This commit is contained in:
Aleksey Belousov 2020-04-06 01:30:02 +03:00 committed by Vladimir Byko-Ianko
parent ca1fce567f
commit 3900fe3ac9
4 changed files with 15 additions and 17 deletions

View file

@ -314,6 +314,7 @@
4598438621394CFD00F8CAB2 /* MetalPerformanceShaders.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4598438521394CFD00F8CAB2 /* MetalPerformanceShaders.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
45CBCCBA20590AAB006B55C2 /* libkml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 45CBCCBB20590AAB006B55C2 /* libkml.a */; };
45FFD65D1E965EBE00DB854E /* liblocal_ads.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 45FFD65C1E965EBE00DB854E /* liblocal_ads.a */; };
4701A93D243A917900B87683 /* TouchTransparentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4701A93C243A917800B87683 /* TouchTransparentView.swift */; };
4707E4B12372FE860017DF6E /* PlacePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4707E4AF2372FE860017DF6E /* PlacePageViewController.swift */; };
4707E4B42372FF480017DF6E /* PlacePage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4707E4B32372FF480017DF6E /* PlacePage.storyboard */; };
470A89FD21342A9D00D72FBF /* TutorialBlurView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 470A89FC21342A9D00D72FBF /* TutorialBlurView.swift */; };
@ -1407,6 +1408,7 @@
46F26CD610F623BA00ECCA39 /* EAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = EAGLView.h; sourceTree = "<group>"; };
46F26CD710F623BA00ECCA39 /* EAGLView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = EAGLView.mm; sourceTree = "<group>"; };
46F8A2EB10EB63040045521A /* MapViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = MapViewController.h; sourceTree = "<group>"; };
4701A93C243A917800B87683 /* TouchTransparentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TouchTransparentView.swift; sourceTree = "<group>"; };
4707E4AF2372FE860017DF6E /* PlacePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePageViewController.swift; sourceTree = "<group>"; };
4707E4B32372FF480017DF6E /* PlacePage.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = PlacePage.storyboard; sourceTree = "<group>"; };
470A89FC21342A9D00D72FBF /* TutorialBlurView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TutorialBlurView.swift; sourceTree = "<group>"; };
@ -3374,6 +3376,7 @@
470F0B7E2388431E006AEC94 /* StarRatingView.swift */,
478F6FA323C447E500054A53 /* ReviewView.swift */,
478F6FA723C5067C00054A53 /* MyReviewView.swift */,
4701A93C243A917800B87683 /* TouchTransparentView.swift */,
);
path = Views;
sourceTree = "<group>";
@ -5731,6 +5734,7 @@
3DE1762422D614B8000214FF /* PromoAfterBookingViewController.swift in Sources */,
4707E4B12372FE860017DF6E /* PlacePageViewController.swift in Sources */,
34AB66441FC5AA330078E451 /* RouteManagerViewModelProtocol.swift in Sources */,
4701A93D243A917900B87683 /* TouchTransparentView.swift in Sources */,
3486B5081E27A4B50069C126 /* LocalNotificationManager.mm in Sources */,
3454D7BF1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift in Sources */,
991FCA2423B11E61009AD684 /* BookmarksStyleSheet.swift in Sources */,

View file

@ -1,5 +1,5 @@
protocol PlacePageViewProtocol: class {
var presenter: PlacePagePresenterProtocol! { get set }
var presenter: PlacePagePresenterProtocol! { get set }
var scrollView: UIScrollView! { get set }
var beginDragging: Bool { get set }
@ -23,17 +23,6 @@ final class PlacePageScrollView: UIScrollView {
}
}
final class TouchTransparentView: UIView {
var targetView: UIView?
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
guard let targetView = targetView else {
return super.point(inside: point, with: event)
}
let targetPoint = convert(point, to: targetView)
return targetView.point(inside: targetPoint, with: event)
}
}
@objc final class PlacePageViewController: UIViewController {
@IBOutlet var scrollView: UIScrollView!
@IBOutlet var stackView: UIStackView!
@ -55,10 +44,6 @@ final class TouchTransparentView: UIView {
super.viewDidLoad()
presenter?.configure()
if let touchTransparentView = view as? TouchTransparentView {
touchTransparentView.targetView = scrollView
}
let bgView = UIView()
bgView.styleName = "PPBackgroundView"
stackView.insertSubview(bgView, at: 0)

View file

@ -0,0 +1,9 @@
final class TouchTransparentView: UIView {
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
let view = super.hitTest(point, with: event)
if view === self {
return nil
}
return view
}
}

View file

@ -80,7 +80,7 @@
<constraint firstItem="65S-M4-TnM" firstAttribute="leading" secondItem="rL1-9E-4b7" secondAttribute="leading" priority="100" id="zBX-w3-K7G"/>
</constraints>
</view>
<view hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" placeholderIntrinsicWidth="infinite" placeholderIntrinsicHeight="500" translatesAutoresizingMaskIntoConstraints="NO" id="rbx-Oj-jeo">
<view hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" placeholderIntrinsicWidth="infinite" placeholderIntrinsicHeight="500" translatesAutoresizingMaskIntoConstraints="NO" id="rbx-Oj-jeo" customClass="TouchTransparentView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="0.0" y="64" width="414" height="832"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>