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);

}

しかし、ヘッダービューは変更されません

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 に答える