loading from tableview done

This commit is contained in:
2016-03-27 19:40:15 +02:00
parent ff9b96d277
commit 71eea899e0
6 changed files with 19 additions and 40 deletions
+4
View File
@@ -7,10 +7,14 @@
//
#import "SharedDeclerations.h"
#import "ViewController.h"
#import <UIKit/UIKit.h>
@class ViewController;
@interface TableViewController : UITableViewController
@property(strong, nonatomic) ViewController *main;
@property(strong, nonatomic) NSMutableArray *dataSource;
@end
+8
View File
@@ -85,6 +85,14 @@
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[self
dismissViewControllerAnimated:YES
completion:^(void) {
[_main
loadSave:[tableView
cellForRowAtIndexPath:indexPath]
.textLabel.text];
}];
}
@end
+1
View File
@@ -8,6 +8,7 @@
#import "SharedDeclerations.h"
#import "ViewController.h"
#import "ViewControllerServiceMenu.h"
#import <UIKit/UIKit.h>
@class ViewController;
+5 -6
View File
@@ -107,12 +107,11 @@
#warning EXPORT TO PMDG GOES HERE
} else if ([((UILabel *)tapReg.view)
.restorationIdentifier isEqualToString:@"LSKR6"]) {
[self
presentViewController:
[self.storyboard
instantiateViewControllerWithIdentifier:@"ServiceMenu"]
animated:YES
completion:nil];
UINavigationController *sm = [self.storyboard
instantiateViewControllerWithIdentifier:@"ServiceMenu"];
((ViewControllerServiceMenu *)[sm.childViewControllers firstObject])
.main = _main;
[self presentViewController:sm animated:YES completion:nil];
} else {
((UILabel *)tapReg.view).text = _Scratchpad.text;
}
@@ -27,6 +27,7 @@
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
((TableViewController *)[segue destinationViewController]).title =
segue.identifier;
((TableViewController *)[segue destinationViewController]).main = _main;
}
@end