diff options
| author | Ronny Fenrich <Fenrich@Gmail.com> | 2013-06-13 15:42:18 -0600 |
|---|---|---|
| committer | Ronny Fenrich <Fenrich@Gmail.com> | 2013-06-13 15:42:18 -0600 |
| commit | 40217b602ff811ea5194402a359f675fff082dd4 (patch) | |
| tree | ea5e9db517702da51da1c9e77c47d181541b855f /Volta/Views | |
| parent | c26ea939e366cdc82cc43cca93f02e9c2e6a3907 (diff) | |
added workspace file
Diffstat (limited to 'Volta/Views')
| -rw-r--r-- | Volta/Views/LoginViewController.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Volta/Views/LoginViewController.m b/Volta/Views/LoginViewController.m index 341b274..4f3b10a 100644 --- a/Volta/Views/LoginViewController.m +++ b/Volta/Views/LoginViewController.m @@ -35,6 +35,22 @@ self.password.leftViewMode = UITextFieldViewModeAlways; self.contentView.$y = 0; + + // prepopulate username/password with stored information + NSError *error; + NSString *username = [SSKeychain passwordForService:KEYCHAIN_USER_NAME account:KEYCHAIN_ACCOUNT error:&error]; + if (error) { username = nil; } + NSString *password = [SSKeychain passwordForService:KEYCHAIN_USER_PASSWORD account:KEYCHAIN_ACCOUNT error:&error]; + if (error) { password = nil; } + + if (username) + { + self.email.text = username; + } + if (password) + { + self.password.text = password; + } } @@ -184,4 +200,5 @@ } + @end |
