Commit 608d0df3 authored by 余玠's avatar 余玠

避免使用动态方法导致苹果审核问题

parent 7d66d8cd
...@@ -176,13 +176,14 @@ static NSUInteger kInstanceCounter = 0; ...@@ -176,13 +176,14 @@ static NSUInteger kInstanceCounter = 0;
[FlutterBoostPlugin sharedInstance].fParams = _params; [FlutterBoostPlugin sharedInstance].fParams = _params;
} }
[super viewWillAppear:animated];
//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]),
.receiver = self, // .receiver = self,
}; // };
NSMethodSignature * (*callSuper)(struct objc_super *, SEL, BOOL animated) = (__typeof__(callSuper))objc_msgSendSuper; // NSMethodSignature * (*callSuper)(struct objc_super *, SEL, BOOL animated) = (__typeof__(callSuper))objc_msgSendSuper;
callSuper(&target, @selector(viewWillAppear:), animated); // callSuper(&target, @selector(viewWillAppear:), animated);
} }
- (void)viewDidAppear:(BOOL)animated - (void)viewDidAppear:(BOOL)animated
...@@ -220,13 +221,14 @@ static NSUInteger kInstanceCounter = 0; ...@@ -220,13 +221,14 @@ static NSUInteger kInstanceCounter = 0;
pageName:_name pageName:_name
params:_params params:_params
uniqueId:self.uniqueIDString]; uniqueId:self.uniqueIDString];
[super viewDidDisappear:animated];
// instead of calling [super viewDidDisappear:animated];, call super's super // instead of calling [super viewDidDisappear: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]),
.receiver = self, // .receiver = self,
}; // };
NSMethodSignature * (*callSuper)(struct objc_super *, SEL, BOOL animated) = (__typeof__(callSuper))objc_msgSendSuper; // NSMethodSignature * (*callSuper)(struct objc_super *, SEL, BOOL animated) = (__typeof__(callSuper))objc_msgSendSuper;
callSuper(&target, @selector(viewDidDisappear:), animated); // callSuper(&target, @selector(viewDidDisappear:), animated);
} }
- (void)installSplashScreenViewIfNecessary { - (void)installSplashScreenViewIfNecessary {
......
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