viewDidMoveToSuperview may not be implemented

This commit is contained in:
Cheng Zhao 2018-05-02 21:36:51 +09:00
parent 5547df6073
commit a2c3db666e

View file

@ -244,7 +244,9 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
// [BridgedContentView viewDidMoveToSuperview];
auto original = reinterpret_cast<decltype(&ViewDidMoveToSuperview)>(
original_view_did_move_to_superview);
return original(self, _cmd);
if (original)
original(self, _cmd);
return;
}
[self setFrame:[[self superview] bounds]];
}