Commit 6e2b6dfb authored by 余玠's avatar 余玠

避免调用动态方法

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