Skip to content

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

Description

@HotWordland
#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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions