如何加载tableview标题部分iphone中的显示?

时间:2022-12-17 19:39:34

how can i display a image in tableview header section iphone ?

如何在tableview标题部分iphone中显示图像?

1 个解决方案

#1


2  

Just set its view to an UIImageView :

只需将其视图设置为UIImageView:

UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"foobar.png"]];
[[self tableView] setTableHeaderView:imageView];

#1


2  

Just set its view to an UIImageView :

只需将其视图设置为UIImageView:

UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"foobar.png"]];
[[self tableView] setTableHeaderView:imageView];