iOS: A few code modernizations

This commit is contained in:
Jonathan Schleifer 2017-11-26 20:19:07 +01:00
parent ccc0706caa
commit f886262722
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
8 changed files with 46 additions and 33 deletions

View file

@ -77,7 +77,7 @@ clearNSMutableString(NSMutableString *string)
_length = [siteStorage lengthForSite: _name];
_legacy = [siteStorage isSiteLegacy: _name];
self.nameField.text = [_name NSObject];
self.nameField.text = _name.NSObject;
self.lengthField.text = [NSString stringWithFormat: @"%zu", _length];
self.legacySwitch.on = _legacy;
@ -182,7 +182,7 @@ clearNSMutableString(NSMutableString *string)
generator.site = _name;
generator.length = _length;
passphrase = of_strdup([self.passphraseField.text UTF8String]);
passphrase = of_strdup(self.passphraseField.text.UTF8String);
generator.passphrase = passphrase;
mainStoryboard = [UIStoryboard storyboardWithName: @"Main"