爱程序网

下拉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上可以实现

关于爱程序网 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助