美文网首页
判断:判断当前子视图是否已添加到父视图上

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

作者: 想想8606 | 来源:发表于2022-03-30 13:10 被阅读0次
- (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];
}

相关文章

网友评论

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

      本文链接:https://www.haomeiwen.com/subject/twnijrtx.html