tableView界面当无数据时显示为一个ImageView

http://www.jianshu.com/p/a196e97e4bef
设置内容
_tableView.backgroundColor= [UIColor clearColor];

UIView * view = [[UIView alloc]initWithFrame:self.view.frame];

UIImageView*imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"dahuizhaiyao_tubiao150"]];
imageView.frame = CGRectMake((SCREEN_WIDTH - flexibleWidth(150))/2.0f, flexibleHeight(120), flexibleWidth(150), flexibleHeight(150));
[view addSubview:imageView];
_tableView.backgroundView = view;

数据请求成功里面
if (_dataArray.count > 0) {
_tableView.backgroundView.hidden = YES;
}

你可能感兴趣的:(tableView界面当无数据时显示为一个ImageView)