Commit c4c429b6 authored by 余玠's avatar 余玠

let the FLBViewController re-layout when it will be appear

parent dbd1a0a5
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
- (void)viewDidAppear:(BOOL)animated{ - (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated]; [super viewDidAppear:animated];
//注意这行代码不可缺少 //注意这行代码不可缺少
[self.flutterContainer.view setNeedsLayout]; // [self.flutterContainer.view setNeedsLayout];
// [self.flutterContainer.view layoutIfNeeded]; // [self.flutterContainer.view layoutIfNeeded];
} }
/* /*
......
...@@ -183,6 +183,7 @@ static NSUInteger kInstanceCounter = 0; ...@@ -183,6 +183,7 @@ static NSUInteger kInstanceCounter = 0;
} }
[super viewWillAppear:animated]; [super viewWillAppear:animated];
[self.view setNeedsLayout];
//instead of calling [super viewWillAppear:animated];, call super's super //instead of calling [super viewWillAppear:animated];, call super's super
// struct objc_super target = { // struct objc_super target = {
// .super_class = class_getSuperclass([FlutterViewController class]), // .super_class = class_getSuperclass([FlutterViewController class]),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment