Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
805 | - | 1 | // |
2 | // PSToggleSwitchSpecifier.m |
||
3 | // InAppSettingsTestApp |
||
4 | // |
||
5 | // Created by David Keegan on 11/21/09. |
||
6 | // Copyright 2009 InScopeApps{+}. All rights reserved. |
||
7 | // |
||
8 | |||
9 | #import "InAppSettingsPSMultiValueSpecifierCell.h" |
||
10 | #import "InAppSettingsConstants.h" |
||
11 | |||
12 | @implementation InAppSettingsPSMultiValueSpecifierCell |
||
13 | |||
14 | - (NSString *)getValueTitle{ |
||
15 | NSArray *titles = [self.setting valueForKey:InAppSettingsSpecifierTitles]; |
||
16 | NSArray *values = [self.setting valueForKey:InAppSettingsSpecifierValues]; |
||
17 | |||
18 | id obj = [self.setting getValue]; |
||
19 | NSLog(@"%@",obj); |
||
20 | NSInteger valueIndex = [values indexOfObject:[self.setting getValue]]; |
||
21 | if((valueIndex >= 0) && (valueIndex < (NSInteger)[titles count])){ |
||
22 | return InAppSettingsLocalize([titles objectAtIndex:valueIndex], self.setting.stringsTable); |
||
23 | } |
||
24 | return nil; |
||
25 | } |
||
26 | |||
27 | - (void)setUIValues{ |
||
28 | [super setUIValues]; |
||
29 | |||
30 | [self setTitle]; |
||
31 | [self setDetail:[self getValueTitle]]; |
||
32 | } |
||
33 | |||
34 | - (void)setupCell{ |
||
35 | [super setupCell]; |
||
36 | |||
37 | [self setDisclosure:YES]; |
||
38 | self.canSelectCell = YES; |
||
39 | } |
||
40 | |||
41 | @end |