开发者

how to create label in the table header in iphone applications?

开发者 https://www.devze.com 2023-03-22 00:23 出处:网络
Hi all i have create a table 开发者_Go百科at run time while loading the page. How to create a label at run time and assign a text to the label in the table header section.

Hi all i have create a table 开发者_Go百科at run time while loading the page. How to create a label at run time and assign a text to the label in the table header section.

Thanks


Make your data source return the correct NSString in -(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section;.

If you have others requirements than just displaying text in the header, implement this table view delegate method :

- (UIView *) tableView:(UITableView *)tableView
viewForHeaderInSection:(NSInteger)section;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号