This commit is contained in:
Micah Gomez 2020-02-17 12:23:55 -08:00
commit 0916512159
3 changed files with 29 additions and 16 deletions

View file

@ -17,6 +17,7 @@
} }
@property (weak, nonatomic) IBOutlet UILabel *FlashBackTitle; @property (weak, nonatomic) IBOutlet UILabel *FlashBackTitle;
@property (weak, nonatomic) IBOutlet UINavigationBar *navigationBar;
@end @end

View file

@ -327,21 +327,33 @@ NSString *backupNameSelected;
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
UIButton *createBackupButton = [UIButton buttonWithType:UIButtonTypeSystem]; if (@available(iOS 11.0, *)) {
[createBackupButton addTarget:self action:@selector(createBackup:) forControlEvents:UIControlEventTouchUpInside]; if (self.navigationController.navigationBar.prefersLargeTitles){
[createBackupButton setImage:[UIImage imageNamed:@"create"] forState:UIControlStateNormal]; UIButton *createBackupButton = [UIButton buttonWithType:UIButtonTypeSystem];
createBackupButton.tintColor = [UIColor systemBlueColor]; [createBackupButton addTarget:self action:@selector(createBackup:) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem._largeTitleAccessoryView = createBackupButton; [createBackupButton setImage:[UIImage imageNamed:@"create"] forState:UIControlStateNormal];
// Do any additional setup after loading the view. createBackupButton.tintColor = [UIColor systemBlueColor];
self.navigationItem._largeTitleAccessoryView = createBackupButton;
}
else {
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"create"] style:UIBarButtonItemStylePlain target:self action:@selector(createBackup:)];
}
} else {
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"create"] style:UIBarButtonItemStylePlain target:self action:@selector(createBackup:)];
}
selectedBackupPickerView.delegate=self;
selectedBackupPickerView.dataSource=self;
// MARK: List of Backups is found and added to this array
//_backupFolderArray = @[@"one",@"two",@"three"]; // Do any additional setup after loading the view.
_backupFolderArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/var/mobile/Library/FlashBack/Backups/" error:nil];
selectedBackupPickerView.delegate=self;
selectedBackupPickerView.dataSource=self;
// MARK: List of Backups is found and added to this array
//_backupFolderArray = @[@"one",@"two",@"three"];
_backupFolderArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/var/mobile/Library/FlashBack/Backups/" error:nil];
} }