AddExtDocumentViewController.m 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. //
  2. // AddExtDocumentViewController.m
  3. // Granite Expo eSign
  4. //
  5. // Created by Ray on 01/03/2017.
  6. // Copyright © 2017 United Software Applications, Inc. All rights reserved.
  7. //
  8. #import "AddExtDocumentViewController.h"
  9. @interface AddExtDocumentViewController ()
  10. @end
  11. @implementation AddExtDocumentViewController
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. // Do any additional setup after loading the view.
  15. }
  16. - (void)didReceiveMemoryWarning {
  17. [super didReceiveMemoryWarning];
  18. // Dispose of any resources that can be recreated.
  19. }
  20. - (IBAction)onScanClicked:(id)sender {
  21. }
  22. - (IBAction)onAddImageClicked:(id)sender {
  23. }
  24. - (IBAction)onAddFileClicked:(id)sender {
  25. }
  26. - (IBAction)onUploadClicked:(id)sender {
  27. }
  28. #pragma mark - Table view data source
  29. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
  30. {
  31. return 44;
  32. }
  33. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  34. {
  35. return 1;
  36. }
  37. //- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
  38. //{
  39. // return 44;
  40. //}
  41. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  42. {
  43. return self.arr_documents.count;
  44. }
  45. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  46. {
  47. NSString *CellIdentifier = @"ADTableViewCell";
  48. UITableViewCell * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  49. NSDictionary * item_json = self.arr_documents[indexPath.row];
  50. NSString* type = item_json[@"type"];
  51. NSString* file_name = item_json[@"file_name"];
  52. NSString* upload_date = item_json[@"upload_date"];
  53. NSString* url = item_json[@"url"];
  54. if([type isEqualToString:@"file"])
  55. cell.imageView.image = [UIImage imageNamed:@"file_icon"];
  56. else
  57. cell.imageView.image = [UIImage imageNamed:@"picture_icon"];
  58. cell.textLabel.text = file_name;
  59. cell.detailTextLabel.text = upload_date;
  60. return cell;
  61. }
  62. #pragma mark tableview delegate
  63. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  64. {
  65. // NSDictionary * item_json = self.arr_documents[indexPath.row];
  66. // // NSString* type = item_json[@"type"];
  67. // // NSString* file_name = item_json[@"file_name"];
  68. // // NSString* upload_date = item_json[@"upload_date"];
  69. // NSString* url = item_json[@"url"];
  70. //
  71. //
  72. //
  73. // bool isLocalFile= false;//[self.content_data[indexPath.row] valueForKey:@"isLocalFile"];
  74. //
  75. //
  76. //
  77. //
  78. // // ExtDocumentsViewController * docVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"ExtDocumentsViewController"];
  79. // //
  80. // // docVC.docNumber = doc_number;
  81. // // docVC.arr_documents =arr_doc;
  82. // // notesVC.docNotes = notes;
  83. //
  84. //
  85. //
  86. // PDFViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PDFViewController"];
  87. // ViewController.url = url;
  88. // ViewController.canSave = false;
  89. // ViewController.isLocalfile=isLocalFile;
  90. // ViewController.defaultStyle = true;
  91. // // ViewController.save_name = title;
  92. // //
  93. // //
  94. // // NSMutableArray* send_to = [[NSMutableArray alloc]init];
  95. // //
  96. // // ViewController.mail_to = send_to;
  97. // //
  98. // //
  99. // // ViewController.mail_subject = subject;
  100. //
  101. // ViewController.hidenavi = false;
  102. //
  103. //
  104. // UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:ViewController] ;
  105. //
  106. //
  107. //
  108. //
  109. //
  110. //
  111. // navi.modalPresentationStyle = UIModalPresentationFullScreen;//有三种状态,自己看看是哪种
  112. // [self presentViewController:navi animated:YES completion:^{
  113. //
  114. // // navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
  115. //
  116. // // DebugLog(@"filter present.........");
  117. //
  118. // // self.btop = false;
  119. // // <#code#>
  120. // }];
  121. }
  122. /*
  123. #pragma mark - Navigation
  124. // In a storyboard-based application, you will often want to do a little preparation before navigation
  125. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  126. // Get the new view controller using [segue destinationViewController].
  127. // Pass the selected object to the new view controller.
  128. }
  129. */
  130. @end