Permalink
Browse files

git-svn-id: http://accelerometer-simulator.googlecode.com/svn/trunk@5

…397896d2-8d55-11dd-aa02-45bbecb07bf0
  • Loading branch information...
otto.chrons@gmail.com
otto.chrons@gmail.com committed Sep 28, 2008
1 parent 904488d commit d715db57137997718425c62454f9391072e62fb3
Showing with 0 additions and 55 deletions.
  1. +0 −55 AccSim/Classes/OnOffTableCell.m
@@ -1,55 +0,0 @@
-//
-// OnOffTableCell.m
-// MikeTeoTutorial
-//
-// Created by Michael Teo http://miketeo.net/
-// Use of this file is governed by Creative Commons Attribution-Non Commercial License
-//
-
-#import "OnOffTableCell.h"
-
-@implementation OnOffTableCell
-
-@synthesize title;
-@synthesize onOffSwitch;
-@synthesize notificationName;
-
-- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
- if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) {
- // Initialization code
- CGRect rect;
- rect = CGRectMake(195.0, 8.0, 60.0, 40.0);
- onOffSwitch = [[UISwitch alloc] initWithFrame:rect];
- [onOffSwitch addTarget:self
- action:@selector(switchToggled:)
- forControlEvents:UIControlEventValueChanged];
- [[self contentView] addSubview:onOffSwitch];
-
- rect = CGRectMake(20.0, 2.0, 150.0, 40.0);
- title = [[UILabel alloc] initWithFrame:rect];
- [[self contentView] addSubview:title];
-
- self.selectionStyle = UITableViewCellSelectionStyleNone;
- }
- return self;
-}
-
-- (void)switchToggled:(UISwitch*)control {
- NSLog(@"OnOffTableCell:switchToggled: Switch toggled for '%s'. New value is %d\n",
- [self.title.text UTF8String],
- control.on);
- [[NSNotificationCenter defaultCenter] postNotificationName:self.notificationName object:control];
-}
-
-- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
-
- [super setSelected:selected animated:animated];
-
- // Configure the view for the selected state
-}
-
-- (void)dealloc {
- [super dealloc];
-}
-
-@end

0 comments on commit d715db5

Please sign in to comment.