我试着去必须在一个UITableView底部固定页脚。 它总是会在底部,不与表格单元格滚动。 它也不能切出来,像盖细胞uitable视图的最后一个单元格这样一个细胞将被隐藏。 我有以下的头文件:
//fooer contains a number_of_total_clicks label, an a proceedtopayment button.
@interface checkout : UITableViewController
@property (retain, nonatomic) IBOutlet UILabel *number_of_total_clicks;
- (IBAction)proceedtonextview:(id)sender;
@property (retain, nonatomic) IBOutlet UIView *footer; //?
@property (strong, nonatomic) NSMutableDictionary *items_clicked;
@end
and in my .m file
- (void)viewDidLoad
{
[super viewDidLoad];
//self.tableView.tableFooterView= footer; ??
number_of_total_clicks.text=@"0";
}
//void or IBAction?V
- (void)add_item_to_array_of_clicks_which_will_increment_number_of_total_clicks_value:(id)sender{
number_of_total_clicks.text=[NSString stringWithFormat:@"$%.2f",[sender doubleValue]*5];
[self.tableView reloadData];
}
会发生什么事是我得到一个页脚基本上是连接表中的最后一个单元格,所以如果表只有3个单元,“页脚”与number_of_total_clicks将作为第四单元连接。 如果有45个细胞,他页脚将是他第46次仅细胞入店一次我滚动一路下跌。 我希望它Ø被固定在底部。 谢谢