Im trying to have a footer Fixed at the bottom of a uitableview. it will always be at the bottom, not scrollable with the table cells. It also cant cut out and cells like cover the last cell of a uitable view so one cell will be hidden. I have the following header file:
//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];
}
What happens is I get a footer the is basically attached to the last cell of the table so if the table has only 3 cells, the "footer" with the number_of_total_clicks will be attached as a 4th cell. if there are 45 cells, he footer will be he 46th cell only accesible once I scroll all the way down. I want it o be fixed a the bottom. Thanks