简体   繁体   中英

add content to top portion of a UITableView programmatically

In the Interface Builder you can drag a UI element (such as a UITextField ) to a grouped UITableView and it allows you to attach that view to the top or bottom of the table.

How can I do this programmatically? (also, what is this called?)

UITableView具有您可以设置的tableHeaderView和tableFooterView属性。

您可以将textField添加为tableView的headerView或Footer视图。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM