// // AddExtDocumentViewController.m // Granite Expo eSign // // Created by Ray on 01/03/2017. // Copyright © 2017 United Software Applications, Inc. All rights reserved. // #import "AddExtDocumentViewController.h" @interface AddExtDocumentViewController () @end @implementation AddExtDocumentViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } - (IBAction)onScanClicked:(id)sender { } - (IBAction)onAddImageClicked:(id)sender { } - (IBAction)onAddFileClicked:(id)sender { } - (IBAction)onUploadClicked:(id)sender { } #pragma mark - Table view data source - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; { return 44; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } //- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section //{ // return 44; //} - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return self.arr_documents.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *CellIdentifier = @"ADTableViewCell"; UITableViewCell * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; NSDictionary * item_json = self.arr_documents[indexPath.row]; NSString* type = item_json[@"type"]; NSString* file_name = item_json[@"file_name"]; NSString* upload_date = item_json[@"upload_date"]; NSString* url = item_json[@"url"]; if([type isEqualToString:@"file"]) cell.imageView.image = [UIImage imageNamed:@"file_icon"]; else cell.imageView.image = [UIImage imageNamed:@"picture_icon"]; cell.textLabel.text = file_name; cell.detailTextLabel.text = upload_date; return cell; } #pragma mark tableview delegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // NSDictionary * item_json = self.arr_documents[indexPath.row]; // // NSString* type = item_json[@"type"]; // // NSString* file_name = item_json[@"file_name"]; // // NSString* upload_date = item_json[@"upload_date"]; // NSString* url = item_json[@"url"]; // // // // bool isLocalFile= false;//[self.content_data[indexPath.row] valueForKey:@"isLocalFile"]; // // // // // // ExtDocumentsViewController * docVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"ExtDocumentsViewController"]; // // // // docVC.docNumber = doc_number; // // docVC.arr_documents =arr_doc; // // notesVC.docNotes = notes; // // // // PDFViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PDFViewController"]; // ViewController.url = url; // ViewController.canSave = false; // ViewController.isLocalfile=isLocalFile; // ViewController.defaultStyle = true; // // ViewController.save_name = title; // // // // // // NSMutableArray* send_to = [[NSMutableArray alloc]init]; // // // // ViewController.mail_to = send_to; // // // // // // ViewController.mail_subject = subject; // // ViewController.hidenavi = false; // // // UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:ViewController] ; // // // // // // // navi.modalPresentationStyle = UIModalPresentationFullScreen;//有三种状态,自己看看是哪种 // [self presentViewController:navi animated:YES completion:^{ // // // navi.view.superview.bounds = CGRectMake(0, 0, 480, 320); // // // DebugLog(@"filter present........."); // // // self.btop = false; // // <#code#> // }]; } /* #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