| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- //
- // PriceGroupListViewController.m
- // HMLG Scan Order
- //
- // Created by Rui Zhang on 8/25/22.
- // Copyright © 2022 United Software Applications, Inc. All rights reserved.
- //
- #import "PriceGroupListViewController.h"
- @interface PriceGroupListViewController ()
- @end
- @implementation PriceGroupListViewController
- //
- - (void)viewDidLoad {
- [super viewDidLoad];
- [[self navigationController] setNavigationBarHidden:false animated:NO];
- UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"back"] imageWithRenderingMode:UIImageRenderingModeAutomatic]
- style:UIBarButtonItemStylePlain
- target:self
- action:@selector( onBackClick:)];
- // self.navigationController.navigationItem.leftBarButtonItem=closeButton;
- self.navigationItem.leftBarButtonItem = closeButton;
- }
- - (void)onBackClick:(UIButton *)sender {
-
-
- [self.navigationController popViewControllerAnimated:FALSE];
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-
- return self.pricelist.count;
-
-
- }
- //- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- // return 136.0f;
- //}
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString *MyIdentifier = @"Cell";
-
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
-
- if (cell == nil)
- {
- cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
- reuseIdentifier:MyIdentifier];
- }
-
- // AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
- cell.textLabel.text = self.pricelist[indexPath.row];
-
- return cell;
- }
- - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-
-
- if(self.returnValue)
- self.returnValue(indexPath.item);
-
- [[self navigationController]popViewControllerAnimated:true];
-
- // [self dismissViewControllerAnimated:TRUE completion:nil];
-
- }
- /*
- #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.
- }
- */
- @end
|