cityingMa

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

posted on 2016-02-18 16:21  cityingMa  阅读(1148)  评论(2编辑  收藏  举报

导航