你的位置:首页 > 操作系统

[操作系统]下拉tableView实现类似微信中带图的灰色背景


UIView *topView = [[UIView alloc]initWithFrame:CGRectMake(0, -480, ScreenWidth, 480)];  UIImageView *iconImage = [[UIImageView alloc]initWithFrame:CGRectMake((ScreenWidth - 35)/2.0,380, 35, 35)];  iconImage.image = [UIImage imageNamed:@"pic_dropdown.png"];  iconImage.contentMode = UIViewContentModeCenter;  [topView addSubview:iconImage];  topView.backgroundColor = [UIColor colorWithRed:246/255.0 green:246/255.0 blue:246/255.0 alpha:1];  [_tableView addSubview:topView];

将topView加到tableView上可以实现