Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢冠章
flutter_boost_1.22.4
Commits
37ad32e7
Commit
37ad32e7
authored
Sep 22, 2020
by
ColdPaleLight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pop gesture problem
parent
3e46fc3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
ios/Classes/Boost/FlutterBoostPlugin.m
ios/Classes/Boost/FlutterBoostPlugin.m
+12
-2
ios/Classes/container/FLBFlutterViewContainer.h
ios/Classes/container/FLBFlutterViewContainer.h
+1
-0
ios/Classes/container/FLBFlutterViewContainer.m
ios/Classes/container/FLBFlutterViewContainer.m
+8
-0
No files found.
ios/Classes/Boost/FlutterBoostPlugin.m
View file @
37ad32e7
...
...
@@ -95,9 +95,19 @@
pageInfo
[
@"uniqueId"
]
=
[
FlutterBoostPlugin
sharedInstance
].
fPageId
;
if
(
result
)
result
(
pageInfo
);
}
else
if
([
@"disablePopGesture"
isEqualToString
:
call
.
method
])
{
[
FlutterBoostPlugin
sharedInstance
].
application
.
flutterViewController
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
NO
;
FLBFlutterViewContainer
*
flutterViewController
=
[
FlutterBoostPlugin
sharedInstance
].
application
.
flutterViewController
;
if
([
flutterViewController
isKindOfClass
:
flutterViewController
.
class
])
{
flutterViewController
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
NO
;
flutterViewController
.
disablePopGesture
=
@
(
YES
);
}
}
else
if
([
@"enablePopGesture"
isEqualToString
:
call
.
method
]){
[
FlutterBoostPlugin
sharedInstance
].
application
.
flutterViewController
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
YES
;
FLBFlutterViewContainer
*
flutterViewController
=
[
FlutterBoostPlugin
sharedInstance
].
application
.
flutterViewController
;
if
([
flutterViewController
isKindOfClass
:
flutterViewController
.
class
])
{
flutterViewController
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
YES
;
flutterViewController
.
disablePopGesture
=
@
(
NO
);
}
}
else
{
result
(
FlutterMethodNotImplemented
);
}
...
...
ios/Classes/container/FLBFlutterViewContainer.h
View file @
37ad32e7
...
...
@@ -29,6 +29,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface
FLBFlutterViewContainer
:
FlutterViewController
<
FLBFlutterContainer
>
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
@property
(
nonatomic
,
strong
)
NSNumber
*
disablePopGesture
;
-
(
instancetype
)
init
NS_DESIGNATED_INITIALIZER
;
-
(
void
)
surfaceUpdated
:(
BOOL
)
appeared
;
@end
...
...
ios/Classes/container/FLBFlutterViewContainer.m
View file @
37ad32e7
...
...
@@ -275,6 +275,14 @@ static NSUInteger kInstanceCounter = 0;
[
self
surfaceUpdated
:
YES
];
[
super
viewDidAppear
:
animated
];
// Enable or disable pop gesture
// note: if disablePopGesture is nil, do nothing
if
(
self
.
disablePopGesture
)
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
!
[
self
.
disablePopGesture
boolValue
];
}
}
-
(
void
)
viewWillDisappear
:(
BOOL
)
animated
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment