-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
override_didMoveToWindow infinite loop when running Xcode 12 and iOS 14 #381
Comments
Thank you! |
Try to replace - (void)override_didMoveToWindow
{
if (self.class != [UIView class]) {
Method currentMethod = class_getInstanceMethod(self.class, @selector(override_didMoveToWindow));
Method expectedMethod = class_getInstanceMethod([UIView class], @selector(override_didMoveToWindow));
if (currentMethod && expectedMethod) {
/// Both subclass and UIView override method override_didMoveToWindow,
/// In this case, just invoke method of UIView(original implementation of `didMoveToWindow`).
if (currentMethod != expectedMethod) {
((void (*)(id, Method))method_invoke)(self, expectedMethod);
return;
}
}
}
if (!self.isNUIApplied) {
[self applyNUI];
}
[self override_didMoveToWindow];
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This could be related to #91, #154 or #275, but I'm not sure.
It works fine on Xcode 12 and iOS 13.5.
The text was updated successfully, but these errors were encountered: