Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义NullView 设置frame无效~ #1

Open
HotWordland opened this issue Feb 14, 2018 · 0 comments
Open

自定义NullView 设置frame无效~ #1

HotWordland opened this issue Feb 14, 2018 · 0 comments

Comments

@HotWordland
Copy link

HotWordland commented Feb 14, 2018

#ifdef CUSTOM_NULLVIEW_TEST
        // 基于NullView 进行修改,可修改frame,image,text
        if (showNullView) { // 无数据,empty data -》 show nullview
            [self.tableView wy_showNullView:^UIView *(NullView *defaultNullView) {
                defaultNullView.desText = @"基于NullView自定义";
                defaultNullView.frame = CGRectMake(0, 0, 375, defaultNullView.frame.size.height);
                defaultNullView.backgroundColor = [UIColor cyanColor];
                return defaultNullView;
            } heightOffset:0.0];
        } else { // 有数据,data -》 hide nullview
            [self.tableView wy_hideNullView];
        }
#endif

demo里面这段代码 我开启了CUSTOM_NULLVIEW_TEST 设置defaultNullView的width为375 实际显示出来的frame没有改变 修改不了~

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant