次の写真のようにしたい。
そのように使用するにはどうすればよいですか?
それは次の方法ですか?
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
ありがとう。
次の写真のようにしたい。
そのように使用するにはどうすればよいですか?
それは次の方法ですか?
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
ありがとう。
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIView *footer = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 540, 10)];
footer.backgroundColor = [UIColor clearColor];
UILabel *lbl = [[UILabel alloc]initWithFrame:footer.frame];
lbl.backgroundColor = [UIColor clearColor];
lbl.text = @"Your Text";
lbl.textAlignment = NSTextAlignmentCenter;
[footer addSubview:lbl];
return footer;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 10.0;
}