MenuViewController.m 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. //
  2. // MenuViewController.m
  3. // Granite Expo eSign
  4. //
  5. // Created by Ray on 02/03/2017.
  6. // Copyright © 2017 United Software Applications, Inc. All rights reserved.
  7. //
  8. #import "MenuViewController.h"
  9. @interface MenuViewController ()
  10. @end
  11. @implementation MenuViewController
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. self.tableView = [[UITableView alloc] initWithFrame:self.view.frame];
  15. self.tableView.delegate = self;
  16. self.tableView.dataSource = self;
  17. [self.view addSubview:self.tableView];
  18. // Do any additional setup after loading the view.
  19. }
  20. - (void)didReceiveMemoryWarning {
  21. [super didReceiveMemoryWarning];
  22. // Dispose of any resources that can be recreated.
  23. }
  24. #pragma mark - Table view data source
  25. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
  26. {
  27. return 44;
  28. }
  29. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  30. {
  31. return 1;
  32. }
  33. //- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
  34. //{
  35. // return 44;
  36. //}
  37. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  38. {
  39. return self.arr_menuItems.count;
  40. }
  41. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  42. {
  43. NSString *CellIdentifier = @"ADTableViewCell";
  44. UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  45. if (cell == nil) {
  46. cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
  47. }
  48. NSString * item = self.arr_menuItems[indexPath.row];
  49. cell.textLabel.text = item;
  50. return cell;
  51. }
  52. #pragma mark tableview delegate
  53. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  54. {
  55. }
  56. //- (instancetype)initWithFrame:(CGRect)frame
  57. //{
  58. // if(self=[super init])
  59. // {
  60. // self.fram
  61. // }
  62. // return self;
  63. //}
  64. /*
  65. #pragma mark - Navigation
  66. // In a storyboard-based application, you will often want to do a little preparation before navigation
  67. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  68. // Get the new view controller using [segue destinationViewController].
  69. // Pass the selected object to the new view controller.
  70. }
  71. */
  72. @end