diff --git a/Easydict/Feature/Utility/EZCategory/NSViewController+EZWindow.h b/Easydict/Feature/Utility/EZCategory/NSViewController+EZWindow.h index de32711b0..9890d7b89 100644 --- a/Easydict/Feature/Utility/EZCategory/NSViewController+EZWindow.h +++ b/Easydict/Feature/Utility/EZCategory/NSViewController+EZWindow.h @@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN @interface NSViewController (EZWindow) -- (NSWindow *)window; +- (nullable NSWindow *)window; @end diff --git a/Easydict/Feature/Utility/EZCategory/NSViewController+EZWindow.m b/Easydict/Feature/Utility/EZCategory/NSViewController+EZWindow.m index a73e9e2aa..a46341981 100644 --- a/Easydict/Feature/Utility/EZCategory/NSViewController+EZWindow.m +++ b/Easydict/Feature/Utility/EZCategory/NSViewController+EZWindow.m @@ -10,7 +10,7 @@ @implementation NSViewController (EZWindow) -- (NSWindow *)window { +- (nullable NSWindow *)window { NSResponder *responder = self; while ((responder = [responder nextResponder])) { if ([responder isKindOfClass:[NSWindow class]]) {