0
- (void)viewDidLoad
{
[super viewDidLoad];
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
  //      self.view.frame=CGRectMake(0,20,self.view.frame.size.width,self.view.frame.size.height-20);
    self.headerView.frame=CGRectMake(0,20,320,45);

}

但是headerview没有改变任何人都可以帮助

4

1 回答 1

0
    -(void)viewDidLoad
    {
        // ...
        UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(XXX, YYY, XXX, YYY)];
         UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(XXX, YYY, XXX, YYY)];
         [headerView addSubview:imageView];
         UILabel *labelView = [[UILabel alloc] initWithFrame:CGRectMake(XXX, YYY, XXX, YYY)];
         [headerView addSubview:labelView];
         self.tableView.tableHeaderView = headerView;

         // ...
    } 
于 2013-10-08T12:38:17.307 回答