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
1
Merge Requests
1
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
c5bde26c
Commit
c5bde26c
authored
Feb 15, 2020
by
余玠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix page become disabled when presented a view controller in the top of a pushed VC
parent
208afc9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
ios/Classes/1.5/FLB2FlutterViewContainer.m
ios/Classes/1.5/FLB2FlutterViewContainer.m
+15
-0
No files found.
ios/Classes/1.5/FLB2FlutterViewContainer.m
View file @
c5bde26c
...
...
@@ -45,6 +45,8 @@
if
(
self
=
[
super
initWithEngine
:
FLUTTER_APP
.
flutterProvider
.
engine
nibName:
nil
bundle:
nil
]){
//NOTES:在present页面时,默认是全屏,如此可以触发底层VC的页面事件。否则不会触发而导致异常
self
.
modalPresentationStyle
=
UIModalPresentationFullScreen
;
[
self
_setup
];
}
return
self
;
...
...
@@ -196,6 +198,12 @@ static NSUInteger kInstanceCounter = 0;
uniqueId:
self
.
uniqueIDString
];
[[[
UIApplication
sharedApplication
]
keyWindow
]
endEditing
:
YES
];
[
super
viewWillDisappear
:
animated
];
//NOTES:因为UIViewController在present view后dismiss其页面的view disappear会发生在下一个页面view appear之后,从而让当前engine持有的vc inactive,此处可驱使其重新resume
if
(
!
[
self
.
uniqueIDString
isEqualToString
:[(
FLB2FlutterViewContainer
*
)
FLUTTER_VC
uniqueIDString
]])
{
[
FLUTTER_APP
resume
];
}
}
...
...
@@ -207,6 +215,13 @@ static NSUInteger kInstanceCounter = 0;
uniqueId:
self
.
uniqueIDString
];
[
super
viewDidDisappear
:
animated
];
//NOTES:因为UIViewController在present view后dismiss其页面的view disappear会发生在下一个页面view appear之后,导致当前engine持有的VC被surfaceUpdate(NO),从而销毁底层的raster。此处是考虑到这种情形,重建surface
if
(
FLUTTER_VC
.
beingPresented
||
self
.
beingDismissed
||
!
[
self
.
uniqueIDString
isEqualToString
:[(
FLB2FlutterViewContainer
*
)
FLUTTER_VC
uniqueIDString
]])
{
[
FLUTTER_APP
resume
];
[(
FLB2FlutterViewContainer
*
)
FLUTTER_VC
surfaceUpdated
:
YES
];
}
}
-
(
void
)
installSplashScreenViewIfNecessary
{
...
...
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