summaryrefslogtreecommitdiffstats
path: root/Classes/SourcesEditViewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/SourcesEditViewController.m')
-rw-r--r--Classes/SourcesEditViewController.m24
1 files changed, 21 insertions, 3 deletions
diff --git a/Classes/SourcesEditViewController.m b/Classes/SourcesEditViewController.m
index 7c04808..d0ca382 100644
--- a/Classes/SourcesEditViewController.m
+++ b/Classes/SourcesEditViewController.m
@@ -7,6 +7,7 @@
//
#import "SourcesEditViewController.h"
+#import "SourcesEditViewCell.h"
@implementation SourcesEditViewController
@@ -19,6 +20,8 @@
- (void)viewDidLoad {
[super viewDidLoad];
+
+ self.tableView.rowHeight = 100;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
@@ -84,11 +87,26 @@
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString *CellIdentifier = @"Cell";
+ static NSString *CellIdentifier = @"SourcesEditCell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ SourcesEditViewCell *cell = (SourcesEditViewCell *)[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ NSArray *tmpCell = [[NSBundle mainBundle] loadNibNamed:@"TopicTableViewCell" owner:self options:nil];
+
+ for (id currentObj in tmpCell) {
+ if ([currentObj isKindOfClass:[TopicTableViewCell class]]) {
+ cell = (SourcesEditViewCell *)currentObj;
+ [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
+
+ UISwitch *mySwitch = [[[UISwitch alloc] initWithFrame:CGRectZero] autorelease];
+ [cell addSubview:mySwitch];
+ cell.accessoryView = mySwitch;
+
+ //cell.accessoryView = cell.switcher;
+ break;
+ }
+ }
+ //cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell...