iOS: Add initial parts of support for key files

This commit is contained in:
Jonathan Schleifer 2017-11-26 21:09:53 +01:00
parent f886262722
commit fa21a9d8f3
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
13 changed files with 226 additions and 99 deletions

View file

@ -47,11 +47,36 @@ showAlert(UIViewController *controller, NSString *title, NSString *message)
[_nameField release];
[_lengthField release];
[_legacySwitch release];
[_keyFileLabel release];
[_mainViewController release];
[super dealloc];
}
- (void)tableView: (UITableView *)tableView
didSelectRowAtIndexPath: (NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath: indexPath
animated: YES];
if (indexPath.section == 1 && indexPath.row == 1)
[self selectKeyFile];
}
- (NSIndexPath *)tableView: (UITableView *)tableView
willSelectRowAtIndexPath: (NSIndexPath *)indexPath
{
if (indexPath.section == 1 && indexPath.row == 1)
return indexPath;
return nil;
}
- (void)selectKeyFile
{
showAlert(self, @"Not Supported", @"Key files are not supported yet");
}
- (IBAction)done: (id)sender
{
OFString *name = self.nameField.text.OFObject;
@ -87,7 +112,8 @@ showAlert(UIViewController *controller, NSString *title, NSString *message)
[self.mainViewController.siteStorage setSite: name
length: length
legacy: self.legacySwitch.on];
legacy: self.legacySwitch.on
keyFile: nil];
[self.mainViewController reset];
[self.navigationController popViewControllerAnimated: YES];