1
0
Fork 0

fix 原生页面touch事件会透至下面flutter 页面的问题

master
wanghualei 2022-06-29 21:59:58 +08:00
parent 59ecbfe934
commit b2de97e9ef
6 changed files with 88 additions and 16 deletions

View File

@ -1,11 +1,11 @@
PODS:
- FinApplet (2.35.13)
- FinAppletExt (2.35.13):
- FinApplet (= 2.35.13)
- FinApplet (2.36.9)
- FinAppletExt (2.36.9):
- FinApplet (= 2.36.9)
- Flutter (1.0.0)
- mop (0.1.1):
- FinApplet (= 2.35.13)
- FinAppletExt (= 2.35.13)
- FinApplet (= 2.36.9)
- FinAppletExt (= 2.36.9)
- Flutter
DEPENDENCIES:
@ -24,11 +24,11 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/mop/ios"
SPEC CHECKSUMS:
FinApplet: 995ebc5f7a8d1f2f917652df084a67250bf37e76
FinAppletExt: a49121f7f855cc78d7b650de2dba3450936d83ab
FinApplet: d374b915fe0a84f332c7ae75a21c45424d177ef3
FinAppletExt: 9aa5a79efc24d9904371489c6d42756b50a4e32d
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
mop: d534eed805110178433155c8793b5464950890b8
mop: 1c5a4255def49cd06be5098dd460812cb903f1e6
PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d
COCOAPODS: 1.10.1
COCOAPODS: 1.11.3

View File

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
@ -15,6 +15,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
A84A83B8286C8E500000E7F4 /* FATFlutterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A84A83B7286C8E500000E7F4 /* FATFlutterViewController.m */; };
D633F869EAF2622663E7A6C4 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 69BD2AEC140040D71731672C /* libPods-Runner.a */; };
/* End PBXBuildFile section */
@ -48,6 +49,8 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A84A83B6286C8E500000E7F4 /* FATFlutterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FATFlutterViewController.h; sourceTree = "<group>"; };
A84A83B7286C8E500000E7F4 /* FATFlutterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FATFlutterViewController.m; sourceTree = "<group>"; };
B1258BD5DC3A8CB9CAEF4240 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
B8B9EC8425B09BF8603CCF51 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -117,6 +120,8 @@
children = (
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
A84A83B6286C8E500000E7F4 /* FATFlutterViewController.h */,
A84A83B7286C8E500000E7F4 /* FATFlutterViewController.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
@ -288,6 +293,7 @@
buildActionMask = 2147483647;
files = (
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
A84A83B8286C8E500000E7F4 /* FATFlutterViewController.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);

View File

@ -1,26 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="FATFlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-381" y="8"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,17 @@
//
// FATFlutterViewController.h
// Runner
//
// Created by Haley on 2022/6/29.
// Copyright © 2022 The Chromium Authors. All rights reserved.
//
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface FATFlutterViewController : FlutterViewController
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,44 @@
//
// FATFlutterViewController.m
// Runner
//
// Created by Haley on 2022/6/29.
// Copyright © 2022 The Chromium Authors. All rights reserved.
//
#import "FATFlutterViewController.h"
@interface FATFlutterViewController ()
@end
@implementation FATFlutterViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
if (self.presentedViewController) {
return;
}
[super touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event {
if (self.presentedViewController) {
return;
}
[super touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {
if (self.presentedViewController) {
return;
}
[super touchesEnded:touches withEvent:event];
}
@end

View File

@ -41,5 +41,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>