| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- //
- // ScanServerListViewController.m
- // HMLG Scan Order
- //
- // Created by Rui Zhang on 4/2/22.
- // Copyright © 2022 United Software Applications, Inc. All rights reserved.
- //
- #import "ScanServerListViewController.h"
- @interface ScanServerListViewController ()
- @end
- @implementation ScanServerListViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-
- return self.serverlist.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];
- }
- cell.textLabel.text = self.serverlist[indexPath.row][@"show_name"];
-
- return cell;
- }
- - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-
-
- if(self.returnValue)
- self.returnValue((int)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
|