我試圖顯示UITableView一些簡(jiǎn)單的數(shù)據(jù)。我希望設(shè)置的靜態(tài)高度,以UITableView使其在表格末尾不顯示空單元格。我怎么做?碼:- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { NSLog(@"%d", [arr count]); return [arr count];}
3 回答

心有法竹
TA貢獻(xiàn)1866條經(jīng)驗(yàn) 獲得超5個(gè)贊
在Xcode 6.1上快速實(shí)現(xiàn)
self.tableView.tableFooterView = UIView(frame: CGRectZero)
self.tableView.tableFooterView?.hidden = true
第二行代碼不會(huì)對(duì)演示產(chǎn)生任何影響,您可以使用它來檢查是否隱藏。
- 3 回答
- 0 關(guān)注
- 418 瀏覽
添加回答
舉報(bào)
0/150
提交
取消