判断:判断当前子视图是否已添加到父视图上

2022-03-30  本文已影响0人  想想8606
- (void)showStoreView{
    //判断:判断当前子视图是否已添加到父视图上
    if (![self.mStorePickView isDescendantOfView:self.view]) {
        [self.view addSubview:self.mStorePickView];
        MJWeakSelf;
        [self.mStorePickView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.bottom.right.mas_equalTo(0);
            make.top.mas_equalTo(weakSelf.mSearchBarView.mas_bottom);
        }];
    }
    [self.mStorePickView reloadWithNewSource:self.searchResults searchBarText:self.mSearchBarView.text];
}
上一篇 下一篇

猜你喜欢

热点阅读