| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- //
- // ScanHistoryViewController.m
- // HMLG Scan Order
- //
- // Created by Rui Zhang on 3/29/22.
- // Copyright © 2022 United Software Applications, Inc. All rights reserved.
- //
- #import "ScanHistoryViewController.h"
- #import "ScanListCell.h"
- #import "RASingleton.h"
- @interface ScanHistoryViewController ()
- @end
- @implementation ScanHistoryViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-
- return RASingleton.sharedInstance.scan_list.count;
-
-
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return 166.0f;
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- ScanListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ScanListCell"];
- if (!cell) {
- cell = [[ScanListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ScanListCell"];
- }
- NSMutableArray* arr = RASingleton.sharedInstance.scan_list;
-
- [cell setModelJson:arr[indexPath.row]];
-
-
- return cell;
- }
- //#pragma mark - TableView Delegate
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- //- (IBAction)onAddToCart:(id)sender {
- //
- // [self dismissViewControllerAnimated:true completion:^{
- // if(self.returnValue)
- // self.returnValue(self.modellist);
- // }];
- //
- //
- //}
- #pragma mark - RA_NOTIFICAITON
- -(void) refresh_ui
- {
- [self.tableview reloadData];
- }
- -(void) reload_data {
- [self.tableview reloadData];
- }
- @end
|