2013-04-13 17:40:17 +00:00
|
|
|
/**
|
|
|
|
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
|
|
|
*
|
|
|
|
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
|
|
|
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
|
|
|
*
|
|
|
|
* @author Maarten Billemont <lhunath@lyndir.com>
|
|
|
|
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
//
|
|
|
|
// MPSetupViewController.h
|
|
|
|
// MPSetupViewController
|
|
|
|
//
|
|
|
|
// Created by lhunath on 2013-04-11.
|
|
|
|
// Copyright, lhunath (Maarten Billemont) 2013. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "MPSetupViewController.h"
|
2013-04-25 01:26:04 +00:00
|
|
|
#import "MPiOSAppDelegate.h"
|
2013-04-14 14:24:24 +00:00
|
|
|
#import "MPAppDelegate_Store.h"
|
2013-04-13 17:40:17 +00:00
|
|
|
|
|
|
|
@implementation MPSetupViewController
|
|
|
|
|
2013-04-14 14:24:24 +00:00
|
|
|
- (void)viewDidAppear:(BOOL)animated {
|
|
|
|
|
|
|
|
[super viewDidAppear:animated];
|
|
|
|
|
2013-04-15 04:04:16 +00:00
|
|
|
if (self.rememberLoginSwitch)
|
|
|
|
self.rememberLoginSwitch.on = [[MPiOSConfig get].rememberLogin boolValue];
|
2014-09-29 02:57:38 +00:00
|
|
|
if (self.showPasswordsSwitch)
|
|
|
|
self.showPasswordsSwitch.on = ![[MPiOSConfig get].hidePasswords boolValue];
|
2013-04-14 14:24:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)viewWillDisappear:(BOOL)animated {
|
|
|
|
|
|
|
|
[super viewWillDisappear:animated];
|
|
|
|
|
2013-04-15 04:04:16 +00:00
|
|
|
if (self.rememberLoginSwitch)
|
|
|
|
[MPiOSConfig get].rememberLogin = @(self.rememberLoginSwitch.on);
|
2014-09-29 02:57:38 +00:00
|
|
|
if (self.showPasswordsSwitch)
|
|
|
|
[MPiOSConfig get].hidePasswords = @(!self.showPasswordsSwitch.on);
|
2013-04-14 14:24:24 +00:00
|
|
|
}
|
|
|
|
|
2013-04-13 17:40:17 +00:00
|
|
|
- (IBAction)close:(UIBarButtonItem *)sender {
|
|
|
|
|
|
|
|
[MPiOSConfig get].showSetup = @NO;
|
|
|
|
[self dismissViewControllerAnimated:YES completion:nil];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|