36
36
} OTPTokenEntrySection;
37
37
38
38
typedef enum : NSUInteger {
39
- OTPTokenEntryBasicRowType,
40
39
OTPTokenEntryBasicRowIssuer,
41
40
OTPTokenEntryBasicRowName,
42
41
OTPTokenEntryBasicRowSecret,
43
42
OTPNumberOfTokenEntryBasicRows,
44
43
} OTPTokenEntryBasicRow;
45
44
46
45
typedef enum : NSUInteger {
46
+ OTPTokenEntryAdvancedRowType,
47
47
OTPTokenEntryAdvancedRowDigits,
48
48
OTPTokenEntryAdvancedRowAlgorithm,
49
49
OTPNumberOfTokenEntryAdvancedRows,
@@ -72,12 +72,12 @@ @interface OTPTokenEntryViewController ()
72
72
73
73
@property (nonatomic , strong ) UIBarButtonItem *doneButtonItem;
74
74
75
- @property (nonatomic , strong ) OTPSegmentedControlCell *tokenTypeCell;
76
75
@property (nonatomic , strong ) OTPTextFieldCell *issuerCell;
77
76
@property (nonatomic , strong ) OTPTextFieldCell *accountNameCell;
78
77
@property (nonatomic , strong ) OTPTextFieldCell *secretKeyCell;
79
78
80
79
@property (nonatomic ) BOOL showsAdvancedOptions;
80
+ @property (nonatomic , strong ) OTPSegmentedControlCell *tokenTypeCell;
81
81
@property (nonatomic , strong ) OTPSegmentedControlCell *digitCountCell;
82
82
@property (nonatomic , strong ) OTPSegmentedControlCell *algorithmCell;
83
83
@@ -191,8 +191,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
191
191
switch (indexPath.section ) {
192
192
case OTPTokenEntrySectionBasic:
193
193
switch (indexPath.row ) {
194
- case OTPTokenEntryBasicRowType:
195
- return self.tokenTypeCell ;
196
194
case OTPTokenEntryBasicRowIssuer:
197
195
return self.issuerCell ;
198
196
case OTPTokenEntryBasicRowName:
@@ -203,6 +201,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
203
201
break ;
204
202
case OTPTokenEntrySectionAdvanced:
205
203
switch (indexPath.row ) {
204
+ case OTPTokenEntryAdvancedRowType:
205
+ return self.tokenTypeCell ;
206
206
case OTPTokenEntryAdvancedRowDigits:
207
207
return self.digitCountCell ;
208
208
case OTPTokenEntryAdvancedRowAlgorithm:
@@ -217,22 +217,9 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
217
217
{
218
218
switch (indexPath.section ) {
219
219
case OTPTokenEntrySectionBasic:
220
- switch (indexPath.row ) {
221
- case OTPTokenEntryBasicRowType:
222
- return 44 ;
223
- case OTPTokenEntryBasicRowIssuer:
224
- case OTPTokenEntryBasicRowName:
225
- case OTPTokenEntryBasicRowSecret:
226
- return 74 ;
227
- }
228
- break ;
220
+ return 74 ;
229
221
case OTPTokenEntrySectionAdvanced:
230
- switch (indexPath.row ) {
231
- case OTPTokenEntryAdvancedRowDigits:
232
- case OTPTokenEntryAdvancedRowAlgorithm:
233
- return 54 ;
234
- }
235
- break ;
222
+ return 54 ;
236
223
}
237
224
return 0 ;
238
225
}
0 commit comments