gpt4 book ai didi

ios - 如何从 iOS Xcode 6.1 中的 TableView 中删除页眉和页脚

转载 作者:行者123 更新时间:2023-11-28 18:17:57 26 4
gpt4 key购买 nike

我无法从分组 TableView 中删除页眉和页脚。我使用的是 Xcode 6.1,我的代码如下。

- (void)viewDidLoad {
[super viewDidLoad];

arr=[[NSArray alloc]initWithObjects:@"Facebook",@"Twitter",@"Linkedin", @"Google+",@"App.net", nil];
imgView=[[NSArray alloc]initWithObjects:@"fb.png",@"tw.png",@"ln.png",@"em.png", @"em.png", nil];

self.tableView.layer.borderWidth=1.0;

self.tableView.tableFooterView=[[UIView alloc]initWithFrame:CGRectZero];
self.tableView.tableHeaderView=[[UIView alloc]initWithFrame:CGRectZero];

}

最佳答案

只需将它们设置为零

self.tableView.tableHeaderView = nil;
self.tableView.tableFooterView = nil;

关于ios - 如何从 iOS Xcode 6.1 中的 TableView 中删除页眉和页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29516371/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com