FreeRDP
Loading...
Searching...
No Matches
EditorBaseController Class Reference
Inheritance diagram for EditorBaseController:
Collaboration diagram for EditorBaseController:

Instance Methods

(UITableViewCell *) - tableViewCellFromIdentifier:
 

Detailed Description

Definition at line 25 of file EditorBaseController.h.

Method Documentation

◆ tableViewCellFromIdentifier:

- (UITableViewCell *) tableViewCellFromIdentifier: (NSString *)  identifier

Definition at line 22 of file EditorBaseController.m.

32 :(NSString *)identifier
33{
34 // try to reuse a cell
35 UITableViewCell *cell = [[self tableView] dequeueReusableCellWithIdentifier:identifier];
36 if (cell != nil)
37 return cell;
38
39 // we have to create a new cell
40 if ([identifier isEqualToString:TableCellIdentifierText])
41 {
42 EditTextTableViewCell *textCell =
43 [[[EditTextTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
44 reuseIdentifier:identifier] autorelease];
45 [[textCell textfield] setDelegate:self];
46 cell = textCell;
47 }
48 else if ([identifier isEqualToString:TableCellIdentifierSecretText])
49 {
50 EditSecretTextTableViewCell *secretCell =
51 [[[EditSecretTextTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
52 reuseIdentifier:identifier] autorelease];
53 [[secretCell textfield] setDelegate:self];
54 cell = secretCell;
55 }
56 else if ([identifier isEqualToString:TableCellIdentifierYesNo])
57 {
58 cell = [[[EditFlagTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
59 reuseIdentifier:identifier] autorelease];
60 }
61 else if ([identifier isEqualToString:TableCellIdentifierSelection])
62 {
63 cell = [[[EditSelectionTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1
64 reuseIdentifier:identifier] autorelease];
65 }
66 else if ([identifier isEqualToString:TableCellIdentifierSubEditor])
67 {
68 cell = [[[EditSubEditTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
69 reuseIdentifier:identifier] autorelease];
70 }
71 else if ([identifier isEqualToString:TableCellIdentifierMultiChoice])
72 {
73 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1
74 reuseIdentifier:identifier] autorelease];
75 }
76 else
77 {
78 NSAssert(false, @"Unknown table cell identifier");
79 }
80
81 return cell;
82}

The documentation for this class was generated from the following files: