diff --git a/Easydict/objc/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.m b/Easydict/objc/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.m index 5986ab2a9..28fd0f1af 100644 --- a/Easydict/objc/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.m +++ b/Easydict/objc/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.m @@ -100,7 +100,9 @@ - (instancetype)init { - (instancetype)initWithWindowType:(EZWindowType)type { if (self = [super init]) { self.windowType = type; + [self setupUI]; [self setupData]; + [self updateWindowHeight]; } return self; } @@ -122,8 +124,6 @@ - (void)loadView { - (void)viewDidLoad { [super viewDidLoad]; - - [self setupUI]; } - (void)viewWillAppear { @@ -147,8 +147,6 @@ - (void)setupData { - (void)setupUI { [self tableView]; - [self updateWindowHeight]; - mm_weakify(self); [self setResizeWindowBlock:^{ mm_strongify(self);