UIView *topView = [[UIView alloc]initWithFrame:CGRectMake(0, -480, ScreenWidth, 480)]; UIImageView *iconImage = [[UIImageView alloc]initWithFrame:CGRe
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上可以實現