forked from ChatSecure/ChatSecure-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOTRListSetting.m
48 lines (38 loc) · 1.1 KB
/
OTRListSetting.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// OTRListSetting.m
// Off the Record
//
// Created by David on 11/13/12.
// Copyright (c) 2012 Chris Ballinger. All rights reserved.
//
#import "OTRListSetting.h"
#import "OTRLanguageListSettingViewController.h"
@implementation OTRListSetting
@synthesize possibleValues;
@synthesize defaultValue;
@synthesize value;
- (void)dealloc
{
possibleValues = nil;
}
-(id)initWithTitle:(NSString *)newTitle description:(NSString *)newDescription settingsKey:(NSString *)newSettingsKey
{
if (self = [super initWithTitle:newTitle description:newDescription settingsKey:newSettingsKey])
{
self.action = @selector(editValue);
}
return self;
}
- (void) editValue {
if(self.delegate && [self.delegate conformsToProtocol:@protocol(OTRSettingDelegate)]) {
[self.delegate otrSetting:self showDetailViewControllerClass:[OTRLanguageListSettingViewController class]];
}
}
-(void)setValue:(NSString *)newValue
{
[super setValue:newValue];
if(self.delegate && [self.delegate conformsToProtocol:@protocol(OTRSettingDelegate)]) {
[self.delegate refreshView];
}
}
@end